parsing JSON to extract specific values

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



parsing JSON to extract specific values



I am trying to extract specific values from JSON to write onto the excel against id. Json is in this format


-[
+ ... ,
+ ... ,
+ ...
]



in each + ... I have data something like this


+ ...


"__createdAt" : 2018-07-31T08:40:33.409Z,
"verified_date" : ,
"orderid" : 544663,
"refund" : ,
"order_verified" : ,
"in_process" : ,
"location_id" : ,
"userInfo" : "countrySelect":"AU","postalCode":"3109","City":"Melbourne","GooglePlace":"Melbourne Australia","ShippingCountry":"Australia","ShippingRegion":"Victoria","CustomerEmail":"cus@gmail.com","Phone":"3214749345","CustomerFirstName":"adeel","CustomerLastName":"tahir","Address":"36 andersons creek road, Doncaster east","Zip":"3109","Country":"Australia","FirstName":"adeel","LastName":"tahir","Email":"email@gmail.com","PostCode":"3109",



I need to extract "_createdAt", "orderid" and "postalCode", "CustomerFirstName" from userInfo for each +...
I have rather tried this but it is returning undefined. data is in "tempData"


+...


Array.from(tempData).forEach(function(ele)
console.log("testing: " + ele.orderid);
);





Use Array.map() developer.mozilla.org/en/docs/Web/JavaScript/Reference/…
– Ashish Ranjan
Aug 13 at 8:07





Also, don't confuse the "+" and "-" signs in front of the lines as part of the JSON code. It's only a visual display for block folding/unfolding functionnality.
– RomainVALERI
Aug 13 at 8:10





"+" "-" used only to show the format as the data was too much to post.
– Adeel Tahir
Aug 13 at 8:12









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard