Open fastfedora opened 12 years ago
Hi! Is there any solution for scalar arrays?
No, not yet. I'm not actively developing the library any more. If others want to add this, I'd be happy to merge it in with the main branch.
any updates about this enhancement.?
Same here.
Example:
=ImportJSON("https://api.binance.com/api/v1/klines?symbol=BTCUSDT&interval=1m&limit=1", "", "")
Result:
1532979960000,8093.67000000,8093.67000000,8090.63000000,8090.64000000,17.01185600,1532980019999,137649.58791757,83,15.05237700,121794.23981272,0
Workaround:
=split(concatenate(ImportJSON("https://api.binance.com/api/v1/klines?symbol=BTCUSDT&interval=1m&limit=1")), ",")
@kenorb How you would do with something multidimensional (3x3) like [["40290","BC","ALU"],["1","BC","GRAD"],["30","BC","STAFF"]]
? There is a workaround in this case?
If at least the merge was with a different character like a semicolon we could SPLIT two times.
Also I can't find the correct path (which look like an XPath but is not?) for for example get just the third column.
Scalar arrays currently get collapsed into a single cell, with values separated by commas.
A use case exists where it would be better to return the values as an array. For instance:
Currently calling ImportJSON with a query of "/aaData" returns a 1 x 1 array containing the value:
John,Smith,jsmith@example.com,Tody,Harris,tharris@example.com
Instead, there should be an option to return the values as a 3 x 2 array: