Hello,
I have as output from a python script a list of dictionaries formatted as json.
In each dictionary I have personal information like name and email.
I would like to turn each item in that list into a row, so that the email step is executed for each item separately.
I thought of using JavaScript for that. I can display an alert for each item on this list, but how do I send each item separately to the output?
Is there any other way to do this?
The workflow:
Python Script:
import json
dict_list = [
{
"name": "Jon Doe",
"email": "jon_doe@test.com"
},
{
"name": "Jane Doe",
"email": "jane_doe@test.com"
}
]
dict_list = json.dumps(dict_list)
Java Script:
var parsedInput = JSON.parse(dict_list);
parsedInput.forEach(function(item) {
Alert(JSON.stringify(item));
});
Thanks,
Israel