Nested JSON in HTTPrequest

  1. 2 years ago

    henry_cho

    12 May 2018 User since 2018

    Hi,
    I'm sorry if this is obvious, I do appreciate the help you guys are giving.
    I need to pass through some JSON in the body of my HTTP Request.
    Something like this:
    {
    "fields": {
    "small cup qty": 40
    }
    }

    Its not obvious to me how to post or patch nested values in the request editor as it seems to have just name value pairs and no free text mode?

    I've tried updating the request body using something like

    Airtable.Update.body= '{
    "fields": {
    "small cup qty": 40
    }
    }'

    Any help would be appreciated.
    Thanks guys

  2. andrea

    23 May 2018 Administrator User since 2016

    Hi @henry_cho, in the new version 1.0b21 released today contains various improvements to the HTTPRequest class.
    You can now set the bodyParameters property to any objects that can be converted to a JSON, in your example you can set it to a Map with the following code:

    Airtable.Update.body = ["fields" : ["small cup qty" : 40] ]
  3. henry_cho

    25 May 2018 User since 2018

    That's great thanks!

or Sign Up to reply!