Tuesday, 2 May 2017

javascript/nodejs: get first object from JSONObject

I have a JSONObject that looks like this:

{ a: '1', b: '2', c: '3' }
{ a: '4', b: '5', c: '6' }

I want to access the first object. When I write jsonObject.a it prints 1 AND 4. I just want the 1 and then the 4. Can you iterate through the Object somehow? The JSONObject was generated with the csvtojson package.



via Jan V.

No comments:

Post a Comment