We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any way to query nodes and links? Or would you have to know what kind of data you're receiving beforehand?
The text was updated successfully, but these errors were encountered:
All nodes and links from jsonld are then inside the result object. Example:
const graph = await jsonld2obj([ { "@id": "http://my/Agent", "@type": "http://other/AgentType", "x:some": 0.9 }, { "@id": "http://my/Agent2", "@type": "http://other/AgentType", "x:some": 0.9 } ])
console.log(graph)
{ 'http://my/Agent': { 'http://my/Agent': [Circular], 'x:some': 0.9, '$id': 'http://my/Agent', '$type': MultiVal { 'http://other/AgentType': [Object] } }, 'http://other/AgentType': { '$id': 'http://other/AgentType' }, 'http://my/Agent2': { 'http://my/Agent2': [Circular], 'x:some': 0.9, '$id': 'http://my/Agent2', '$type': MultiVal { 'http://other/AgentType': [Object] } } }
console.log(Object.keys(graph))
new Set(Object.values(graph).flatMap(o => Object.keys(o)).filter(x => !graph[x]))
Sorry, something went wrong.
vsimko
No branches or pull requests
Is there any way to query nodes and links? Or would you have to know what kind of data you're receiving beforehand?
The text was updated successfully, but these errors were encountered: