Search code examples
arrayssparqlontology

SPARQL: array-strings conversion / extraction


I am doing a SPARQL Query that for one variable gives me the output "[-1.6101874126499998e-19]". This is obviously a string containing an array (that could also contain more numbers). Is there a way to access the number in it or does it need to be done in the underlying graph?

If it needs to be changed in the graph, what is a good ontological way to create multi-dimensional arrays...?


Solution

  • xsd:float(SUBSTR(?var,2,STRLEN(?var)-2)) does the job in this case, but it's quite hacky :/