Given I have a json file with the contents:
[
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
}
]
How can I parse this file and get the value for each email tag as I need to perform operations using the values.
Example:
Retrieve list of emails
([email protected], [email protected]...)
for each element in the list pass its value to a function. I understand how to pass it to a function, and have come across the get-in function but im not fully sure how to use it in this context.
Optionally, if possible I wish for the file to be stored
[email protected]
[email protected]
...
which will be more practical. I know how to write to a file and such but im not sure how to extract the email data.