You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do play with the tool you created for some time, and I was wondering if there is a way to represent a python-like list in the transformed JSON. The caveat is that the list should contain multiple variables that query extracts. Let me show you an example of what I am trying to achieve:
#+ "coordinates": [1.234, 3.555],
I can place a hardcoded list with two decimal values in the decorated transform clause. This will indeed allow me to represent a python-like list with multiple values separated by a comma, but I would like to replace those values with variables that are coming from the query. Just like this:
#+ "coordinates": [?a_variable, ?b_variable],
Unfortunately, this doesn't work and the JSON output doesn't produce what I was expecting. You can see the output below.
I have also tried capturing the whole list between "" and the same for variables inside the list, but it didn't help.
Is there any way I could achieve this? My specific goal is to capture latitude and longitude using the SPARQL query. Cast them both as decimals and represent the inside of a single list. For now, I ended up concatenating a string from both coordinates and closed brackets. However, this doesn't feel good.
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered:
Hi @c-martinez @albertmeronyo! First of all, Thank you for your excellent work.
I do play with the tool you created for some time, and I was wondering if there is a way to represent a python-like list in the transformed JSON. The caveat is that the list should contain multiple variables that query extracts. Let me show you an example of what I am trying to achieve:
#+ "coordinates": [1.234, 3.555],
I can place a hardcoded list with two decimal values in the decorated transform clause. This will indeed allow me to represent a python-like list with multiple values separated by a comma, but I would like to replace those values with variables that are coming from the query. Just like this:
#+ "coordinates": [?a_variable, ?b_variable],
Unfortunately, this doesn't work and the JSON output doesn't produce what I was expecting. You can see the output below.
"coordinates": [ { "a_variable": null }, { "b_variable": null } ],
I have also tried capturing the whole list between "" and the same for variables inside the list, but it didn't help.
Is there any way I could achieve this? My specific goal is to capture latitude and longitude using the SPARQL query. Cast them both as decimals and represent the inside of a single list. For now, I ended up concatenating a string from both coordinates and closed brackets. However, this doesn't feel good.
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: