I am having a problem to extract the variable from Json Object which is of data type 'array'. What could be the best way to extract these array objects from request and assign it to send the values to target API.
Solved! Go to Solution.
Vamshi, if you want to extract only one or few known variables from JSON, you can go ahead with Extract Variable Policy or Assign Message Policy(with message template).
Can you provide a sample JSON Object to give you a possible solution?
Vamshi, if you want to extract only one or few known variables from JSON, you can go ahead with Extract Variable Policy or Assign Message Policy(with message template).
Can you provide a sample JSON Object to give you a possible solution?
hey, thanks for suggesting. Yes for now am considering that option and wanted to know if their is any different and best approach. Below is the array and we can expect 1 or 3 contacts.
"contact":[{"contactType":"HOME","contactNumber":"string"}],
current implementation in extractvariables policy:
<Variable name="contactDetails"> <JSONPath>$.applicantInfo.contact[*]</JSONPath> </Variable>
In Assign message, am assigning it as below.
"contact": {contactDetails},
Vamshi, if you want to extract only one or few known variables from JSON, you can go ahead with Extract Variable Policy or Assign Message Policy(with message template).
Can you provide a sample JSON Object to give you a possible solution?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |