when i have a data structure like
{
city1: ['BJ'],
city2: 'BJ'
}
when i use jsonpath to get the json value,
$.city1 it will return ['BJ']
$.city2 it will return ['BJ'] as well,
then the question come out, how could i juddge the element type is a String or is an Array?
when i have a data structure like { city1: ['BJ'], city2: 'BJ' }
when i use jsonpath to get the json value, $.city1 it will return ['BJ'] $.city2 it will return ['BJ'] as well, then the question come out, how could i juddge the element type is a String or is an Array?