[Cppcms-users] access JSON array through path
Brought to you by:
artyom-beilis
|
From: miniME <min...@go...> - 2014-11-08 21:51:10
|
Hey,
is it possible to specify the path to a specific array value?
(see the "cppcms::json::value::get" method)
consider the following JSON:
{
"path": {
"some_array": [
"val1",
"val2",
[
"nested_array1_val1",
"nested_array1_val2",
{
"deeply_nested" : [
"foo"
]
}
]
]
}
}
I would expect to use the path including array values as following:
"path.some_array[0]" --> "val1"
"path.some_array[1]" --> "val2"
"path.some_array[2]" --> array
even nested:
"path.some_array[2][1]" --> "nested_array1_val2"
"path.some_array[2][2].deeply_nested[0]" --> "foo"
It is not documented and doesn't work like this. *Is there some easy way
to achive this?*
|