Format of dot notation for nested array value

Options

What would be the correct dot notation for highlighted nested "key:value" below. The return variable is named "results".

I tried "result.links.1.href" but received an error.

Tagged:

Best Answer

  • dsturnerville
    dsturnerville Member
    Answer ✓
    Options

    Problem resolved. The dot notation was correct. It helps if you are calling the right API endpoint in your function. :)

Answers

  • Lachlan
    Lachlan Administrator

    ADMIN

    Options

    Hey there! Glad you were able to get this working!

    If you are looking to quickly find the correct path within a json object/response you are able to use the Sub Path filter. You can check it out in action at about the minute mark in this video:


    Essentially you can paste the entire response you receive from your external api request (var api_1) normally. You can paste this into the sub-path section and this will provide you with a visual tool to select which path within the response you would like to navigate to.

    There is also a handy tool for visualizing JSON data externally here: https://jsoncrack.com/editor


  • dsturnerville
    Options

    @Lachlan Thanks! That helps.