How to get an element from Jason/Jasonarray

Hi All I have a question
I have this Jason that has an array in it, take a look, my question is how can i only get the img_src value, how do I deserialize it i have tried and get the whole json but when looping trough using if i cant get the img_src value just the whole json, any ideas?

{

 "photos":[
   {
     "id":102693,
     "sol":1000,
     "camera":{
       "id":20,
       "name":"FHAZ",
       "rover_id":5,
       "full_name":"Front Hazard Avoidance Camera"},
     "img_src":"http://mars.jpl.nasa.gov/msl-raw-images/proj/msl/redops/ods/surface/sol/01000/opgs/edr/fcam/FLB_486265257EDR_F0481570FHAZ00323M_.JPG",
     "earth_date":"2015-05-30",
     "rover":{
       "id":5,
       "name":"Curiosity",
       "landing_date":"2012-08-06",
       "launch_date":"2011-11-26",
       "status":"active"}}]

}

It’s just two steps away:
1/ deserialize your json string into a JObject variable (e.g. varJO) using the “Deserialize json” activity
2/ img_src = varJO(“photos”)(0)(“img_src”).ToString

Cheers

2 Likes

Awesome, thank you so much for the help i was pretty close u had used the varJO(“photos”)(0)(4)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.