I have this json file-
[
{
"symbol": "AAPL",
"quantity": 100,
"tradeType": "BUY",
"purchaseDate": "2019-01-02"
},
{
"symbol": "MSFT",
"quantity": 10,
"tradeType": "BUY",
"purchaseDate": "2019-01-02"
},
{
"symbol": "GOOGL",
"quantity": 50,
"tradeType": "BUY",
"purchaseDate": "2019-01-02"
}
]
and I need to prepare the list of all symbols for example if
[{ "symbol": "MSFT"}, { "symbol": "AAPL"}, { "symbol": "GOOGL"}]
then output should be-
["MSFT", "AAPL", "GOOGL"]
Can anyone help me how I can extract "symbol" field value and store above output in list?