Scott H. on Nostr: As long as you stay within keys, and ignore values, objects can be used as a graph ...
As long as you stay within keys, and ignore values, objects can be used as a graph structure. Decomposed graphs are triples, a pile of decomposed knowledge of relations. The feature is that triples do not require order; however, if you assemble them into a graph with objects, you have to do tricks if the ID path doesn't exist. If you use _setWith, it you can default to an Object. _set assumes arrays for ints.
https://lodash.com/docs/#setPublished at
2023-10-22 14:45:38Event JSON
{
"id": "add12e395b792d16f5206f2520d9c38a3d0a94936a58869e3f48fc0d6f5dc9fb",
"pubkey": "e32680a0c6478064701e49296a2b09d1ada5b276378f330600cfc01190afeac7",
"created_at": 1697985938,
"kind": 1,
"tags": [
[
"content-warning",
"For those of you building graphs with JavaScript objects"
],
[
"proxy",
"https://fosstodon.org/users/scotth/statuses/111279206458823398",
"activitypub"
]
],
"content": "As long as you stay within keys, and ignore values, objects can be used as a graph structure. Decomposed graphs are triples, a pile of decomposed knowledge of relations. The feature is that triples do not require order; however, if you assemble them into a graph with objects, you have to do tricks if the ID path doesn't exist. If you use _setWith, it you can default to an Object. _set assumes arrays for ints.\n\nhttps://lodash.com/docs/#set",
"sig": "d78604cbef34434cf7d22779a1da4f4dac58af99a34278667f08187563e25c3e16a02cbeb1d67260d37a56de784394f111bcf74b95cc2ac821a214037f43f8b2"
}