Closed JaneSjs closed 5 months ago
Suggestion: support the jsonPath for Choices RESTful. An example of a JSON path: The input JSON:
[ { "name":"Italy", "regionsList":[ { "name":"Lombardia", "capitalCity":"Milano", "ProvinceList":[ { "name":"Milano", "code":"MI" }, { "name":"Brescia", "code":"BR" } ] }, { "name":"Lazio", "capitalCity":"Rome", "ProvinceList":[ { "name":"Rome", "code":"RM" }, { "name":"Latina", "code":"LT" } ] }, { "name":"Campania", "capitalCity":"Naples", "ProvinceList":[ { "name":"Naples", "code":"NA" }, { "name":"Salerno", "code":"SA" } ] } ] } ]
jsonPath: $..regionsList..ProvinceList[*] You can test this in an online service: https://jsonpath.com/
$..regionsList..ProvinceList[*]
@JaneSjs It is better to use a jsonpath library. It can be used in survey.onLoadChoicesFromServer event.
Thank you, Andrew
Suggestion: support the jsonPath for Choices RESTful. An example of a JSON path: The input JSON:
jsonPath:
$..regionsList..ProvinceList[*]
You can test this in an online service: https://jsonpath.com/