PDA

View Full Version : How to change $jsonresult format?



Tascha
13 Aug 2009, 3:48 AM
Hello again,

I've some other question:

How can I change the $jsonresult from that:


({"success":true,
data: [{
"0":"AAKMST0ACRR5D01",
"hostname":"AAKMST0ACRR5D01",
"1":"10.205.48.10",
"ipv4_addr":"10.205.48.10"}]}) to that:




{
success:true,
data: {
"hostname":"ABCDEFGH",
"ipv4_addr":"12.345.67.89"
}
}I address this problem in http://extjs.com/forum/showthread.php?t=77360&page=3

I think, open a new thread is quite more clearly.

Someone has an idea?


greetings

Tascha ;)

httpdotcom
13 Aug 2009, 5:56 AM
You've stated that this is being generated from your PHP code, and you're asking this on an EXT forum...

Things we would have to know before we could help:
1. Version of PHP
2. Code snippet showing how you are generating the JSON output

Tascha
13 Aug 2009, 8:36 AM
Sorry, I thought it gives a method
or something else to handle that problem.
So then I'll change the forum.

Greetings
Tascha