how to make input field based on json response - json

I got 2 json response. 1st as
{"Request":[{"Key":"Consumer No","Value":"Enter Value"},{"Key":"BU","Value":"Enter Value"}]}
and
2nd as
{"Request":[{"Key":"Customer ID / Account ID","Value":"Enter Value"}]}
i want to create input field based on the response i got
using ajax i get above response so i want to create input field based on json response

Related

How to get the data in front end when API calling returning data in [[101,4],[102,2],[103,1],[104,1],[105,1],[108,1],[109,1]] without key value pair?

When I am calling API its giving data in [[101,4],[102,2],[103,1],[104,1],[105,1],[108,1],[109,1]] format which is only value. Is there any solution that how to get this data in UI in flutter?
Previously I have worked with below type of data coming from API.In this data can be accessed using key name but how to access value in [[101,4],[102,2],[103,1],[104,1],[105,1],[108,1],[109,1]] format when there is no key to access value in Flutter?
[{"activityId":101,"docId":90,"status":1},{"activityId":101,"docId":100,"status":0},{"activityId":101,"docId":159,"status":0},{"activityId":101,"docId":201,"status":0},{"activityId":1784,"docId":123,"status":1}]
This looks like basic List<List<int>> so if data is [[101,4],[102,2],[103,1],[104,1],[105,1],[108,1],[109,1]] let's say you want to access number 4 from the start of the message you'd need to access it like:
final response = <List<int>> [[101,4],[102,2],[103,1],[104,1],[105,1],[108,1],[109,1]]
int four = response[0][1];
print('$four')
in terminal would print value 4

Trello json how to get lists

how to Get list name from Json in trello? I need it to be able to add it in omnifocus. So an http formate that give me the list is best.

how to convert to json from post in Yii2

I want to create json from multiple selection from listbox in yii2 after post i receive following data
categorymodel[0]=11&categorymodel[1]=12&categorymodel[2]=13
how to convert to json data and store in db.
json data like {"11","12","13"}
Once you have the proper array you can use eg:
$retJSON= json_encode($categoryModel);

Drupal 8 - JSON API get with parameters

I can get the list of records I have of a custom content by creating a new "view" and setting the response returned in a JSON format
Now I would like to send a get request, with 1 or more parameters, and only return a subset of records whose fields match with my parameters
ex : www.exmample.com/rest/view/customcontent?city=paris
How could I do that ?
You can create a filter (add filter criteria) in the view. Make it exposed and change the Filter identifier field according what you want to have in the URL.

In Talend, how do you keep input values provided to tSoap so that you can use them with the Soap response?

I have a Talend Job that currently does the following:
Input CSV --Main--> tMap --Output--> tSoap --Main--> Output CSV
The input CSV has
ID and TYPE as input columns.
The Map creates a Soap XML (String) message using the ID from the CSV and passes that String to the tSoap component.
The tSoap component fires the web request, which sends the response to the next component. That data is then written to CSV.
The problem is that TYPE from the input CSV is not passed through to amalgamate with the SOAP response data. Only the response data seems accessible.
I've had a look at tBufferInput / tBufferOutput and tFlowToIterate but they seem to work in scenarios where the tSoap component does not depend on an input from the main flow.
Does anyone know which components can be used to achieve the amalgamation?
Thank you
If you output the data you need to reuse to a tHashOutput component you should be able to rejoin your data with the response output from tSoap assuming there's some natural join element from the response.
I solved this in the end by:
Placing between the output from the tMap and the input to the tSoap, a new component - tSetGlobalVar
Inside tSetGlobalVar, you can then create a new row, which maps an input column (Value) to a named variable that you specify as the 'Key'.
E.g. Key = "ID", Value = row11.ID
The output from tSetGlobalVar then goes into the tSoap component.
The output from tSoap goes into a new tMap.
Inside this new tMap is the Body column from the previous tSoap component which maps to an output column. To access the stored "ID" variable for the current flow/iteration, I created a new output column, and instead of mapping any columns from the inputs, used (String)globalMap.get("ID"); which would insert the value back into the flow.