Alex Gleason on Nostr: The "in" keyword checks the presence of keys, not values. The array has keys 0, 1, 2, ...
The "in" keyword checks the presence of keys, not values. The array has keys 0, 1, 2, 3. Basically "in" does not do the same thing as Python. l.includes(4) is true.
Published at
2023-10-04 13:30:14Event JSON
{
"id": "87d8abf7090882c68939933f08385984880795961541b4bead306be6338d11cd",
"pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",
"created_at": 1696426214,
"kind": 1,
"tags": [
[
"p",
"5c508c34f58866ec7341aaf10cc1af52e9232bb9f859c8103ca5ecf2aa93bf78",
"wss://relay.mostr.pub"
],
[
"e",
"a51296ec7345cd7ed70820bbba426e1a6e5d1398773a3153b11e918ceba5804d",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://gleasonator.com/objects/61208702-0b4d-4786-b147-8a9aa067b97b",
"activitypub"
]
],
"content": "The \"in\" keyword checks the presence of keys, not values. The array has keys 0, 1, 2, 3. Basically \"in\" does not do the same thing as Python. l.includes(4) is true.",
"sig": "336c4ca37d1ecde053216bdd978774bc97b52e0f2f304c1145cfd700c99e987a289ad7e4cc840ad4ed34b3ae0d3d39b4e71d9b951d650b142fb871ec0e0f6bf6"
}