Help needed to parse http output

hey guys,
I need some help parsing the following output returned by an HTTP request node.

[
   {
      "items":[
         {
            "item":{
               "item_id":"xxxx",
               "price":{
                  "code":"EUR",
                  "minor_units":399,
                  "decimals":2
               },
               "sales_taxes":[
                  
               ],
               "tax_amount":{
                  "code":"EUR",
                  "minor_units":0,
                  "decimals":2
               },
               "price_excluding_taxes":{
                  "code":"EUR",
                  "minor_units":399,
                  "decimals":2
               },
               "price_including_taxes":{
                  "code":"EUR",
                  "minor_units":399,
                  "decimals":2
               },
               "value_excluding_taxes":{
                  "code":"EUR",
                  "minor_units":1200,
                  "decimals":2
               },
               "value_including_taxes":{
                  "code":"EUR",
                  "minor_units":1200,
                  "decimals":2
               },
               "taxation_policy":"PRICE_INCLUDES_TAXES",
               "show_sales_taxes":false,
               "cover_picture":{
                  "picture_id":"76916",
                  "current_url":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
               },
               "logo_picture":{
                  "picture_id":"xxxxx",
                  "current_url":"xxxxxxxxxxxxxxxxxxx"
               },
               "name":"xxxxxxxxxxxx",
               "description":"xxxxxxxxxxxxx",
               "can_user_supply_packaging":false,
               "packaging_option":"BAG_ALLOWED",
               "collection_info":"",
               "diet_categories":[
                  
               ],
               "item_category":"GROCERIES",
               "badges":[
                  {
                     "badge_type":"SERVICE_RATING_SCORE",
                     "rating_group":"LIKED",
                     "percentage":91,
                     "user_count":619,
                     "month_count":6
                  },
                  {
                     "badge_type":"OVERALL_RATING_TRUST_SCORE",
                     "rating_group":"LIKED",
                     "percentage":84,
                     "user_count":619,
                     "month_count":6
                  }
               ],
               "positive_rating_reasons":[
                  "POSITIVE_FEEDBACK_DELICIOUS_FOOD",
                  "POSITIVE_FEEDBACK_GREAT_VALUE",
                  "POSITIVE_FEEDBACK_FRIENDLY_STAFF",
                  "POSITIVE_FEEDBACK_GREAT_VARIETY",
                  "POSITIVE_FEEDBACK_GREAT_QUANTITY",
                  "POSITIVE_FEEDBACK_QUICK_COLLECTION"
               ],
               "average_overall_rating":{
                  "average_overall_rating":3.906779661016949,
                  "rating_count":590,
                  "month_count":6
               },
               "favorite_count":0,
               "buffet":false
            },
            "store":{
               "store_id":"xxxxxxxxxxxxxx",
               "store_name":"xxxxxxxxxxxxxxx",
               "branch":"",
               "description":"xxxxxxxxxxxxxx",
               "tax_identifier":"xxxxxx",
               "website":"",
               "store_location":{
                  "address":{
                     "country":{
                        "iso_code":"FR",
                        "name":"France"
                     },
                     "address_line":"xxxxxx",
                     "city":"",
                     "postal_code":""
                  },
                  "location":{
                     "longitude":1.11111,
                     "latitude":1.11111
                  }
               },
               "logo_picture":{
                  "picture_id":"xxxx",
                  "current_url":"xxxxx"
               },
               "store_time_zone":"Europe/Paris",
               "hidden":false,
               "favorite_count":0,
               "we_care":false,
               "distance":5224.890370564475,
               "cover_picture":{
                  "picture_id":"xxxx",
                  "current_url":"xxxxxx"
               }
            },
            "display_name":"xxxxxxx",
            "pickup_interval":{
               "start":"2021-04-22T13:00:00Z",
               "end":"2021-04-22T16:00:00Z"
            },
            "pickup_location":{
               "address":{
                  "country":{
                     "iso_code":"FR",
                     "name":"France"
                  },
                  "address_line":"xxxxxxxx",
                  "city":"",
                  "postal_code":""
               },
               "location":{
                  "longitude":111.3284855,
                  "latitude":111.9257891
               }
            },
            "purchase_end":"2021-04-22T16:00:00Z",
            "items_available":5,
            "distance":5444.890370564475,
            "favorite":true,
            "in_sales_window":true,
            "new_item":false
         },
         {
            "item":{
               "item_id":"xxxxx",
               "price":{
                  "code":"EUR",
                  "minor_units":590,
                  "decimals":2
               },
               "sales_taxes":[
                  
               ],
               "tax_amount":{
                  "code":"EUR",
                  "minor_units":0,
                  "decimals":2
               },
               "price_excluding_taxes":{
                  "code":"EUR",
                  "minor_units":590,
                  "decimals":2
               },
               "price_including_taxes":{
                  "code":"EUR",
                  "minor_units":590,
                  "decimals":2
               },
               "value_excluding_taxes":{
                  "code":"EUR",
                  "minor_units":1800,
                  "decimals":2
               },
               "value_including_taxes":{
                  "code":"EUR",
                  "minor_units":1800,
                  "decimals":2
               },
               "taxation_policy":"PRICE_INCLUDES_TAXES",
               "show_sales_taxes":false,
               "cover_picture":{
                  "picture_id":"xxxx",
                  "current_url":"xxxxxxxxxxxx"
               },
               "logo_picture":{
                  "picture_id":"xxxx",
                  "current_url":"xxxxxxxxxxx"
               },
               "name":"",
               "description":"xxxxx",
               "can_user_supply_packaging":false,
               "packaging_option":"BAG_ALLOWED",
               "collection_info":"",
               "diet_categories":[
                  
               ],
               "item_category":"BAKED_GOODS",
               "badges":[
                  {
                     "badge_type":"SERVICE_RATING_SCORE",
                     "rating_group":"LOVED",
                     "percentage":91,
                     "user_count":602,
                     "month_count":6
                  },
                  {
                     "badge_type":"OVERALL_RATING_TRUST_SCORE",
                     "rating_group":"LOVED",
                     "percentage":88,
                     "user_count":602,
                     "month_count":6
                  }
               ],
               "positive_rating_reasons":[
                  "POSITIVE_FEEDBACK_DELICIOUS_FOOD",
                  "POSITIVE_FEEDBACK_GREAT_QUANTITY",
                  "POSITIVE_FEEDBACK_GREAT_VALUE",
                  "POSITIVE_FEEDBACK_GREAT_VARIETY",
                  "POSITIVE_FEEDBACK_FRIENDLY_STAFF",
                  "POSITIVE_FEEDBACK_QUICK_COLLECTION"
               ],
               "average_overall_rating":{
                  "average_overall_rating":4.454545454545454,
                  "rating_count":561,
                  "month_count":6
               },
               "favorite_count":0,
               "buffet":false
            },
            "store":{
               "store_id":"xxxx",
               "store_name":"xxxx",
               "branch":"",
               "description":"",
               "tax_identifier":"xxxxx",
               "website":"xxxxxxxxxx",
               "store_location":{
                  "address":{
                     "country":{
                        "iso_code":"FR",
                        "name":"France"
                     },
                     "address_line":"xxxxxxxxxxx",
                     "city":"",
                     "postal_code":""
                  },
                  "location":{
                     "longitude":1111.2870338,
                     "latitude":11111.8757686
                  }
               },
               "logo_picture":{
                  "picture_id":"xxxx",
                  "current_url":"xxxxxxx"
               },
               "store_time_zone":"Europe/Paris",
               "hidden":false,
               "favorite_count":0,
               "we_care":false,
               "distance":5439.174469042491,
               "cover_picture":{
                  "picture_id":"xxx",
                  "current_url":"xxxxxxxxx"
               }
            },
            "display_name":"xxxx",
            "pickup_interval":{
               "start":"2021-04-22T16:30:00Z",
               "end":"2021-04-22T16:55:00Z"
            },
            "pickup_location":{
               "address":{
                  "country":{
                     "iso_code":"FR",
                     "name":"France"
                  },
                  "address_line":"xxxx",
                  "city":"",
                  "postal_code":""
               },
               "location":{
                  "longitude":11.2870338,
                  "latitude":111.8757686
               }
            },
            "purchase_end":"2021-04-22T16:55:00Z",
            "items_available":0,
            "sold_out_at":"2021-04-22T05:48:13Z",
            "distance":5439.174469042491,
            "favorite":true,
            "in_sales_window":true,
            "new_item":false
         }
      ]
   }
]

I need to get the “items_available” field for every object in each item returned, to continue the logic.
can you help me parse that?

Thanks

Hey @ja3four!

You will need to use the Function node with the following code snippet to create multiple items from a single item.

return items[0].json.items.map(item => {
  return {
    json: item
  }
});

Once you have multiple items you can refer to the items_available field. Here is the documentation for JavaScript Code Snippets.