Get elements from json array


#1

Hello,
I use the module http for nativescript.
My server send the response in a json array.
For example : [{“pseudo”:“toto”,“password”:“1234”}, {“email”:“toto@gmail.com”}]
I want to get the element of my json array.
Could you tell me how make it ?
Could I get the json elements and create an object with the elements ?
Cordially


#2

Are you looking for something more than JSON.parse?

(Geez - 3 edits to ask a simple question :slight_smile: )


#3

Yes because I don’t know exactly how to get the elements because my json is [{…}, {…}].


#4

It’s just by index (array[index]), you might want to spend some time with basics of JavaScript that would speed up your development.