Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] [Not just Javascript] Looping through JSON data should be simple, shouldn't it? [SOLVED]
- Date: Thu, 02 Dec 2010 01:09:22 +0900
- From: Dave M G <dave@example.com>
- Subject: Re: [tlug] [Not just Javascript] Looping through JSON data should be simple, shouldn't it? [SOLVED]
- References: <4CF3753F.3040008@example.com> <8C6EAABB-CD6F-4015-A14B-0FFF171743B5@example.com> <4CF619DD.2020401@example.com> <AANLkTinKSqq3AOiCkNMfqCJv=RpP5v5EU7fax4GXU_-V@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
Shawn, Thanks for responding. I've got a handle on what's going on now. If you use PHP's json_encode() on a numerical array, then it creates a JSON with the array syntax that has square brackets. If you use it on an associative array, then it creates a JSON with object syntax with squiggly brackets. I couldn't convert to a numerical array, because I needed the keys to be named. But I was able to find Javascript syntax that allowed me to loop through an object. I got the syntax here among the answers: http://stackoverflow.com/questions/921789/how-to-loop-through-javascript-object-literal-with-objects-as-members Keeping track of which levels of the array and which levels of the object to use to get at the right key or value can be a little tricky. But it works. Thanks to everything for the advice and help! -- Dave M G
- References:
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [Not just Javascript] Looping through JSON data should be simple, shouldn't it?
- Next by Date: [tlug] Dinky silent Linux box
- Previous by thread: Re: [tlug] [Not just Javascript] Looping through JSON data should be simple, shouldn't it?
- Next by thread: [tlug] Dinky silent Linux box
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links