Question

GET request response formatting issue

  • 4 November 2021
  • 1 reply
  • 41 views

Userlevel 2
Badge

hi,

 

for an action i'm doing a step where i GET request data,

 

this is a part of the json i get back:

questions[
    {
        question_id: 126496
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's
    },

    {
        question_id: 234
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's

    },

    {
        question_id: 3451
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's

   },

   {
        question_id: 23123
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's

   }

}

then zapier formats it to:

questions
    1
        question_id: 126496
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's
    2
        question_id: 234
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's
    3
        question_id: 3451
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's
    4
        question_id: 23123
        question: question data
        order_nr: 1
        type: main_open
        value: value data, and other text with comma's

 

but i end up with array's for each value like for question_id

questions question_id [126496,234,3451,23123]

 

normaly i would separate the values in a code step with a js split(‘,’) but thats not possible here since the "value” value contains text with commas.

 

is there a other way i can work with this data?

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 6
Badge +6

Hey @Jeff Thorns ,

 

What exactly do you want to do? Why are you transforming the data?