cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
nico
Nintex Newbie

How to build a JSON

Hi everyone,

 

I use nintex Xtension to interact with Google Sheet V4 API.

In the body request I need to send JSON structure, but I don't know how to Build a JSON.

The structure that I want to build is a json multi dimensional array, (an Array of Array).

For exemple : 

[["Val1.1","Val1.2],["Val2.1","Val2.2"]]

In the action "Add item to collection" we can't add collection, only text, int...

 

anyone knows how to achieve this ?

Labels: (1)
0 Kudos
Reply
3 Replies
Nintex Employee
Nintex Employee

Re: How to build a JSON

Hi,
Could you use a combination of Build String actions and maybe regular expressions to create the string and just put it into a text variable?
0 Kudos
Reply
nico
Nintex Newbie

Re: How to build a JSON

Hi, No I can't, because if I store my JSON value in a string variable when the query is sent, the body value is transformed as a string and not array, and I get an error because I pass an array who contains string value and not an Array who contains Array Who contains string value.

 

For exemple, my array is called "values" and I put my JSON array as string in it, the query will be 

"body": {"values":["[\"test1\",\"test2\",\"test3\"]"]}

And not : 

"body": {"values":[[\"test1\",\"test2\",\"test3\"]]}
0 Kudos
Reply
Community Manager Community Manager
Community Manager

Re: How to build a JSON

Pinging @sean_fiene on this to see if he has any thoughts about it.

Tags (2)
0 Kudos
Reply