search

Home  >  Q&A  >  body text

How can I access the luggage information in this JSON?

<p>How do I access baggage information in this JSON? </p> <pre class="brush:php;toolbar:false;">{ "Response": { "Results": [ [{ "Segments": [ [{ "Baggage": "2 PC(s)" } ] ] }]        ]     } }</pre> <p>If I execute Results.Segments.Baggage, nothing is output to the console, please tell me how to get the baggage information from this nested JSON. </p>
P粉401527045P粉401527045531 days ago537

reply all(1)I'll reply

  • P粉071602406

    P粉0716024062023-07-29 10:33:22

    According to your JSON, there is a double array in both Results and Segments.

    Response.Results[0][0].Segments[0][0].Baggage 

    reply
    0
  • Cancelreply