I have a JSon object that is written this way.
Data= [{
"code" : "001",
"city" : "Boston",
"zipcode":"067"
},{
"code" : "002",
"city" : "NY",
},{
"city" : "NewJersey",
}]
In order to get a specific value "Code" in an array, I make this way.
ar= Data["code"].Values
When I print results I got
ar = [001, 002 ,'nan']
'nan' seems like the empty value. How can I get only data that exist in the field without taking in consideration these fields where we don't find "code" attribute in ?