Little utility function to that converts the table-like result of a SPARQL query into a JSON tree with a user-defined structure