Marathon Getting appId: Specify a path - json
I was Deploying Mesos Marathon cluster on ! Master server and 2 slave server. I Set up everything Fine with the load balancer but after setup everythinh i am getting this error from marathon. I was trying to deploy a Database name TiDB
This is my Marathon JSON file to deploy (groups)
[{
"acceptedResourceRoles": [],
"container": {
"docker": {
"forcePullImage": true,
"image": "grafana/grafana:6.0.1",
"network": "BRIDGE",
"parameters": [
{
"key": "user",
"value": "0"
}
],
"portMappings": [
{
"containerPort": 3000,
"hostPort": 3000,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/etc/grafana",
"hostPath": "./config/grafana",
"mode": "RW"
},
{
"containerPath": "/tmp/dashboards",
"hostPath": "./config/dashboards",
"mode": "RW"
},
{
"containerPath": "/var/lib/grafana",
"hostPath": "./data/grafana",
"mode": "RW"
}
]
},
"cpus": 1.0,
"env": {
"GF_LOG_LEVEL": "error",
"GF_PATHS_CONFIG": "/etc/grafana/grafana.ini",
"GF_PATHS_PROVISIONING": "/etc/grafana/provisioning"
},
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "grafana",
"instances": 1,
"mem": 128,
"requirePorts": true
},
{
"acceptedResourceRoles": [],
"args": [
"--name=pd0",
"--client-urls=http://0.0.0.0:2379",
"--peer-urls=http://0.0.0.0:2380",
"--advertise-client-urls=http://pd0:2379",
"--advertise-peer-urls=http://pd0:2380",
"--initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380",
"--data-dir=/data/pd0",
"--config=/pd.toml",
"--log-file=/logs/pd0.log"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/pd:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 2379,
"hostPort": 0,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/pd.toml",
"hostPath": "./config/pd.toml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "pd0",
"instances": 1,
"mem": 128,
"requirePorts": false
},
{
"acceptedResourceRoles": [],
"args": [
"--name=pd1",
"--client-urls=http://0.0.0.0:2379",
"--peer-urls=http://0.0.0.0:2380",
"--advertise-client-urls=http://pd1:2379",
"--advertise-peer-urls=http://pd1:2380",
"--initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380",
"--data-dir=/data/pd1",
"--config=/pd.toml",
"--log-file=/logs/pd1.log"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/pd:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 2379,
"hostPort": 0,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/pd.toml",
"hostPath": "./config/pd.toml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "pd1",
"instances": 1,
"mem": 128,
"requirePorts": false
},
{
"acceptedResourceRoles": [],
"args": [
"--name=pd2",
"--client-urls=http://0.0.0.0:2379",
"--peer-urls=http://0.0.0.0:2380",
"--advertise-client-urls=http://pd2:2379",
"--advertise-peer-urls=http://pd2:2380",
"--initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380",
"--data-dir=/data/pd2",
"--config=/pd.toml",
"--log-file=/logs/pd2.log"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/pd:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 2379,
"hostPort": 0,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/pd.toml",
"hostPath": "./config/pd.toml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "pd2",
"instances": 1,
"mem": 128,
"requirePorts": false
},
{
"acceptedResourceRoles": [],
"args": [
"--log.level=error",
"--storage.tsdb.path=/data/prometheus",
"--config.file=/etc/prometheus/prometheus.yml"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "prom/prometheus:v2.2.1",
"network": "BRIDGE",
"parameters": [
{
"key": "user",
"value": "root"
}
],
"portMappings": [
{
"containerPort": 9090,
"hostPort": 9090,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/etc/prometheus/prometheus.yml",
"hostPath": "./config/prometheus.yml",
"mode": "RO"
},
{
"containerPath": "/etc/prometheus/pd.rules.yml",
"hostPath": "./config/pd.rules.yml",
"mode": "RO"
},
{
"containerPath": "/etc/prometheus/tikv.rules.yml",
"hostPath": "./config/tikv.rules.yml",
"mode": "RO"
},
{
"containerPath": "/etc/prometheus/tidb.rules.yml",
"hostPath": "./config/tidb.rules.yml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "prometheus",
"instances": 1,
"mem": 128,
"requirePorts": true
},
{
"acceptedResourceRoles": [],
"args": [
"--log.level=error"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "prom/pushgateway:v0.3.1",
"network": "BRIDGE"
},
"type": "DOCKER"
},
"cpus": 1.0,
"fetch": [],
"id": "pushgateway",
"instances": 1,
"mem": 128
},
{
"acceptedResourceRoles": [],
"args": [
"--store=tikv",
"--path=pd0:2379,pd1:2379,pd2:2379",
"--config=/tidb.toml",
"--log-file=/logs/tidb.log",
"--advertise-address=tidb"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tidb:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 4000,
"hostPort": 4000,
"protocol": "tcp"
},
{
"containerPort": 10080,
"hostPort": 10080,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/tidb.toml",
"hostPath": "./config/tidb.toml",
"mode": "RO"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "tidb",
"instances": 1,
"mem": 128,
"requirePorts": true
},
{
"acceptedResourceRoles": [],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tidb-vision:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 8010,
"hostPort": 8010,
"protocol": "tcp"
}
]
},
"type": "DOCKER"
},
"cpus": 1.0,
"env": {
"PD_ENDPOINT": "pd0:2379"
},
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "tidb-vision",
"instances": 1,
"mem": 128,
"requirePorts": true
},
{
"acceptedResourceRoles": [],
"args": [
"--addr=0.0.0.0:20160",
"--advertise-addr=tikv0:20160",
"--data-dir=/data/tikv0",
"--pd=pd0:2379,pd1:2379,pd2:2379",
"--config=/tikv.toml",
"--log-file=/logs/tikv0.log"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tikv:latest",
"network": "BRIDGE"
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/tikv.toml",
"hostPath": "./config/tikv.toml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"id": "tikv0",
"instances": 1,
"mem": 128
},
{
"acceptedResourceRoles": [],
"args": [
"--addr=0.0.0.0:20160",
"--advertise-addr=tikv1:20160",
"--data-dir=/data/tikv1",
"--pd=pd0:2379,pd1:2379,pd2:2379",
"--config=/tikv.toml",
"--log-file=/logs/tikv1.log"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tikv:latest",
"network": "BRIDGE"
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/tikv.toml",
"hostPath": "./config/tikv.toml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"id": "tikv1",
"instances": 1,
"mem": 128
},
{
"acceptedResourceRoles": [],
"args": [
"--addr=0.0.0.0:20160",
"--advertise-addr=tikv2:20160",
"--data-dir=/data/tikv2",
"--pd=pd0:2379,pd1:2379,pd2:2379",
"--config=/tikv.toml",
"--log-file=/logs/tikv2.log"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tikv:latest",
"network": "BRIDGE"
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/tikv.toml",
"hostPath": "./config/tikv.toml",
"mode": "RO"
},
{
"containerPath": "/data",
"hostPath": "./data",
"mode": "RW"
},
{
"containerPath": "/logs",
"hostPath": "./logs",
"mode": "RW"
}
]
},
"cpus": 1.0,
"fetch": [],
"id": "tikv2",
"instances": 1,
"mem": 128
},
{
"acceptedResourceRoles": [],
"args": [
"/opt/spark/sbin/start-master.sh"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tispark:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 7077,
"hostPort": 7077,
"protocol": "tcp"
},
{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/opt/spark/conf/spark-defaults.conf",
"hostPath": "./config/spark-defaults.conf",
"mode": "RO"
}
]
},
"cpus": 1.0,
"env": {
"SPARK_MASTER_PORT": "7077",
"SPARK_MASTER_WEBUI_PORT": "8080"
},
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "tispark-master",
"instances": 1,
"mem": 128,
"requirePorts": true
},
{
"acceptedResourceRoles": [],
"args": [
"/opt/spark/sbin/start-slave.sh",
"spark://tispark-master:7077"
],
"container": {
"docker": {
"forcePullImage": true,
"image": "pingcap/tispark:latest",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 38081,
"hostPort": 38081,
"protocol": "tcp"
}
]
},
"type": "DOCKER",
"volumes": [
{
"containerPath": "/opt/spark/conf/spark-defaults.conf",
"hostPath": "./config/spark-defaults.conf",
"mode": "RO"
}
]
},
"cpus": 1.0,
"env": {
"SPARK_WORKER_WEBUI_PORT": "38081"
},
"fetch": [],
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"path": "/",
"portIndex": 0,
"protocol": "HTTP",
"timeoutSeconds": 20
}
],
"id": "tispark-slave0",
"instances": 1,
"mem": 128,
"requirePorts": true
}]
I will Deploy this With:
curl -X POST http://<mesos_master_IP>:8080/v2/groups -d#/root/cluster.json -H "Content-type:application/json"
But I am getting appId: Specify a path
Where Was My Mistake????
It looks like you miss groupID. The part that you posted is just a part of group definiton and should be placed in apps object in groups request
{
"id": "/",
"apps": [...]
}
https://mesosphere.github.io/marathon/api-console/index.html
Related
Get the value of a sub-child element by a sub-child value of JSON response using Groovy
I have the following Groovy script to get the values from the JSON response. import groovy.json.JsonSlurper def inputFile = new File("C:\\Apps\\test.txt") JsonSlurper slurper = new JsonSlurper() Map parsedJson = slurper.parseText(inputFile.text) println parsedJson.value.nodes.find{it.sessionId = '8f667c8556fc7178c427ee4dd64d2d16'}.uri my JSON response is similar to this { "value": { "ready": true, "message": "test ready.", "nodes": [ { "id": "c77a97c2-e510-4e24-8916-2c3962ccdec9", "uri": "http://test001:444", "maxSessions": 2, "heartbeatPeriod": 60000, "availability": "UP", "version": "4.1.1 (revision e8fcc2cecf)", "slots": [ { "id": { "hostId": "c77a97c2-e510-4e24-8916-2c3962ccdec9", "id": "3e659215-2e3c-48e2-9b02-0c986399a8c7" }, "lastStarted": "2022-01-07T19:45:40.320Z", "session": null, }, { "id": { "hostId": "c77a97c2-e510-4e24-8916-2c3962ccdec9", "id": "3985c443-599e-48c3-a34c-9b1cdb8f30ab" }, "lastStarted": "2022-01-07T19:41:03.616Z", "session": { "capabilities": { "acceptInsecureCerts": false, "browserName": "chrome", "browserVersion": "97.0.4692.71", "chrome": { "chromedriverVersion": "97.0.4692.36 (747e0a0f19c13ca6ee136200f5b097448ae4892f-refs/branch-heads/4692#{#607})", "userDataDir": "C:\\Users\\pas_test\\AppData\\Local\\Temp\\scoped_dir7776_2131041583" }, "goog:chromeOptions": { "debuggerAddress": "localhost:50606" }, "networkConnectionEnabled": false, "pageLoadStrategy": "normal", "platformName": "windows", "proxy": { "proxyType": "DIRECT" }, "se:cdp": "ws://10.177.101.17:4444/session/880eb6b2ee4dbf55f23b9a880b61d03c/se/cdp", "se:cdpVersion": "97.0.4692.71", "setWindowRect": true, "strictFileInteractability": false, "timeouts": { "implicit": 0, "pageLoad": 300000, "script": 30000 }, "unhandledPromptBehavior": "dismiss and notify", "webauthn:extension:credBlob": true, "webauthn:extension:largeBlob": true, "webauthn:virtualAuthenticators": true }, "sessionId": "880eb6b2ee4dbf55f23b9a880b61d03c", "start": "2022-01-07T19:41:03.616Z", "stereotype": { "browserName": "chrome", "platformName": "WIN10" }, "uri": "http://test001:444" }, "stereotype": { "browserName": "chrome", "platformName": "WIN10" } } ] }, { "id": "8ee675f0-bb43-49c9-a566-26e014031c74", "uri": "http://test031:444", "maxSessions": 2, "osInfo": { "arch": "amd64", "name": "Windows 10", "version": "10.0" }, "heartbeatPeriod": 60000, "availability": "UP", "version": "4.1.1 (revision e8fcc2cecf)", "slots": [ { "id": { "hostId": "8ee675f0-bb43-49c9-a566-26e014031c74", "id": "67c65e9e-55df-4a00-a132-55969bb56d48" }, "lastStarted": "2022-01-07T19:50:21.931Z", "session": null, "stereotype": { "browserName": "chrome", "platformName": "WIN10" } }, { "id": { "hostId": "8ee675f0-bb43-49c9-a566-26e014031c74", "id": "56831fd6-c943-4af9-ba21-f92661e5d803" }, "lastStarted": "2022-01-07T19:49:41.985Z", "session": null, "stereotype": { "browserName": "chrome", "platformName": "WIN10" } } ] }, { "id": "6273efa7-a41a-42ee-9a9c-1eb853f5bfdb", "uri": "http://test017:444", "maxSessions": 2, "osInfo": { "arch": "amd64", "name": "Windows 10", "version": "10.0" }, "heartbeatPeriod": 60000, "availability": "UP", "version": "4.1.1 (revision e8fcc2cecf)", "slots": [ { "id": { "hostId": "6273efa7-a41a-42ee-9a9c-1eb853f5bfdb", "id": "0e5a15b6-f947-46fe-a022-20987591accf" }, "lastStarted": "2022-01-07T19:44:56.621Z", "session": null, "stereotype": { "browserName": "chrome", "platformName": "WIN10" } }, { "id": { "hostId": "6273efa7-a41a-42ee-9a9c-1eb853f5bfdb", "id": "eb7787aa-f3b1-40b4-9776-a882aa4824d2" }, "lastStarted": "2022-01-07T19:51:02.814Z", "session": { "capabilities": { "acceptInsecureCerts": false, "browserName": "chrome", "browserVersion": "96.0.4664.110", "chrome": { "chromedriverVersion": "96.0.4664.35 (8df3babf8da8faa8aacb78f4848ef66a93b4944b-refs/branch-heads/4664#{#680})", "userDataDir": "C:\\Users\\pas_test\\AppData\\Local\\Temp\\scoped_dir5512_1146555922" }, "goog:chromeOptions": { "debuggerAddress": "localhost:50830" }, "networkConnectionEnabled": false, "pageLoadStrategy": "normal", "platformName": "windows", "proxy": { "proxyType": "DIRECT" }, "se:cdp": "ws://10.177.101.245:4444/session/8f667c8556fc7178c427ee4dd64d2d16/se/cdp", "se:cdpVersion": "96.0.4664.110", "setWindowRect": true, "strictFileInteractability": false, "timeouts": { "implicit": 0, "pageLoad": 300000, "script": 30000 }, "unhandledPromptBehavior": "dismiss and notify", "webauthn:extension:credBlob": true, "webauthn:extension:largeBlob": true, "webauthn:virtualAuthenticators": true }, "sessionId": "8f667c8556fc7178c427ee4dd64d2d16", "uri": "http://test017:444" }, } ] } ] } } I want to get the corresponding 'uri' for the given sessionId("sessionId": "8f667c8556fc7178c427ee4dd64d2d16",). But I am always getting the wrong uri as output i.e my code always returning first uri i.e http://test001:444 instead of http://test017:444 please correct me what I am doing wrong here ? Thanks.
Connecting conversational AI to Alexa
I built my Conversational AI chatbot and followed all the steps to connect it to Alexa but when I try to call my chatbot in alexa simulator,I get the following message: "There was a problem with the requested skill's response" this is the code which appears on JSON output 1 and JSON output 2 after the error: { "version": "1.0", "session": { "new": true, "sessionId": "amzn1.echo-api.session.5e3bb3da-ba51-4422-80cb-c5cace7e3756", "application": { "applicationId": "amzn1.ask.skill.bfb81ac5-d463-4201-b70c-a35f8cc6dbed" }, "user": { "userId": "amzn1.ask.account.AHIAWE37M4SE4Q7DBFIIRLYZYXFKPU42HAD35P5XLHMZA4RGRXFERFRKPAN2I34A56TCC2XEGVNKYH7SW2KVB2NBUYAAY73GRDDXNEFFFY46W2FJXXCLSMAIUWDEUESU3ZMGIYPPYA2WXFXBBHGJBLHNVRYBLXTBLOCJMGOMK4VXNONXGGICYKBBIE7LMCTSUOVEYRAS3E2ATNQ" } }, "context": { "System": { "application": { "applicationId": "amzn1.ask.skill.bfb81ac5-d463-4201-b70c-a35f8cc6dbed" }, "user": { "userId": "amzn1.ask.account.AHIAWE37M4SE4Q7DBFIIRLYZYXFKPU42HAD35P5XLHMZA4RGRXFERFRKPAN2I34A56TCC2XEGVNKYH7SW2KVB2NBUYAAY73GRDDXNEFFFY46W2FJXXCLSMAIUWDEUESU3ZMGIYPPYA2WXFXBBHGJBLHNVRYBLXTBLOCJMGOMK4VXNONXGGICYKBBIE7LMCTSUOVEYRAS3E2ATNQ" }, "device": { "deviceId": "amzn1.ask.device.AHAUYPX373VS2JXBI2E5VG4GPJPAUT5I5KRINQVJCDM7C7MZFGHWSEQV6CKKSHEZQT7HRAIAHS5BRCKLRHDDRTOE3XYWTDOSIW4MKRXAEGZIWA6XQTXY7TRC26PTPZWWB5T6D77XQNDTPLUTKRBOCJ2KLCCYRBUMXLD2GLKU4K2OQXHJDAM4Q", "supportedInterfaces": {} }, "apiEndpoint": "https://api.amazonalexa.com", "apiAccessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJhdWQiOiJodHRwczovL2FwaS5hbWF6b25hbGV4YS5jb20iLCJpc3MiOiJBbGV4YVNraWxsS2l0Iiwic3ViIjoiYW16bjEuYXNrLnNraWxsLmJmYjgxYWM1LWQ0NjMtNDIwMS1iNzBjLWEzNWY4Y2M2ZGJlZCIsImV4cCI6MTU3OTY4NTExMiwiaWF0IjoxNTc5Njg0ODEyLCJuYmYiOjE1Nzk2ODQ4MTIsInByaXZhdGVDbGFpbXMiOnsiY29udGV4dCI6IkFBQUFBQUFBQUFCYkQrVWhLb1dHaUhOOFVsMDhLelhES3dFQUFBQUFBQUFQdkZkcVU4RzczM2QrcU9UZ0I1U1ViMUlBSkwrZFdQTTJnelBZK1V3WE96K3A0K2lrUDhvY1JZZ0c2T0xJdFNrbjNEK0JTNmtCQ1ErMk5xcUFHMW9XdVRaSEczMEU3Z3hFbEF2VlRnNG1DM2lOVmxYOE1USWloLzdtaEt6Q1MrYm1JWjJLbm1IUmxRcjZqRTM4ZlRUdmZDYnZxTTVVVEMrZ21xdzlNeGlTaCtyYjJ4OC82R01ocHVtOGRTZFRDZFpoSEJzbEtib1Q3WjZQMDZuaVhKOFE2TTl6M2pBTmpNZlgyNHg2ckFlU1dlVDVORFZ4NCtaUXVaeFN6UEZtamhhbGpQNnUzWnBHeCtrejFJMHVjZ2pMbS90WTBlZ3ZrUTRyRFVFNzBmTjRDaEZYbWt0UDYxZm12by8xblZSY3dQdTdneHVUbjUvbjlIRGZyaWpoM05iQS9mMkQ1R3kzYnFvTjhSNFBtVEt4eGgxRW9XMGk5SVNpUFdxNEhXQUV3MG83S3U3Nm9xc2NLNW95Ync9PSIsImNvbnNlbnRUb2tlbiI6bnVsbCwiZGV2aWNlSWQiOiJhbXpuMS5hc2suZGV2aWNlLkFIQVVZUFgzNzNWUzJKWEJJMkU1Vkc0R1BKUEFVVDVJNUtSSU5RVkpDRE03QzdNWkZHSFdTRVFWNkNLS1NIRVpRVDdIUkFJQUhTNUJSQ0tMUkhERFJUT0UzWFlXVERPU0lXNE1LUlhBRUdaSVdBNlhRVFhZN1RSQzI2UFRQWldXQjVUNkQ3N1hRTkRUUExVVEtSQk9DSjJLTENDWVJCVU1YTEQyR0xLVTRLMk9RWEhKREFNNFEiLCJ1c2VySWQiOiJhbXpuMS5hc2suYWNjb3VudC5BSElBV0UzN000U0U0UTdEQkZJSVJMWVpZWEZLUFU0MkhBRDM1UDVYTEhNWkE0UkdSWEZFUkZSS1BBTjJJMzRBNTZUQ0MyWEVHVk5LWUg3U1cyS1ZCMk5CVVlBQVk3M0dSRERYTkVGRkZZNDZXMkZKWFhDTFNNQUlVV0RFVUVTVTNaTUdJWVBQWUEyV1hGWEJCSEdKQkxITlZSWUJMWFRCTE9DSk1HT01LNFZYTk9OWEdHSUNZS0JCSUU3TE1DVFNVT1ZFWVJBUzNFMkFUTlEifX0.UV1qiib5UAV4msb27bxN6zBtPnaYg_1ifwWQhuSXNQpDUzM8dQlo29T5O425Itz6M-xufZT5wtJpk-mT2JZUWjdAe8bquTT9YAmAroAp3_Sa-OJ1iXP8qhiPQeu8g7Xwl2XVpFUAuaeqoSyZxzM2dnKBIND18qrcDfDTS9YRzwcrQdBaGlH-_uW0nXDOntyZ7myqB50fBVtlz5xiayHFE5J3-OTaMK4nuggMKzuL8lbYQrcEPwwbt940LiKy4CRjltHA83N1xtyBtkafcOFQPN3UAzFKPI85jUtIFuYUsuIbl7N_f64yOAgtkIQEvjCA-DWQzkerPyHJo2VrF0q7Tw" }, "Viewport": { "experiences": [ { "arcMinuteWidth": 246, "arcMinuteHeight": 144, "canRotate": false, "canResize": false } ], "shape": "RECTANGLE", "pixelWidth": 1024, "pixelHeight": 600, "dpi": 160, "currentPixelWidth": 1024, "currentPixelHeight": 600, "touch": [ "SINGLE" ], "video": { "codecs": [ "H_264_42", "H_264_41" ] } }, "Viewports": [ { "type": "APL", "id": "main", "shape": "RECTANGLE", "dpi": 160, "presentationType": "STANDARD", "canRotate": false, "configuration": { "current": { "video": { "codecs": [ "H_264_42", "H_264_41" ] }, "size": { "type": "DISCRETE", "pixelWidth": 1024, "pixelHeight": 600 } } } } ] }, "request": { "type": "LaunchRequest", "requestId": "amzn1.echo-api.request.1d812f0b-5bce-42a6-bdd5-4791d5876e8e", "timestamp": "2020-01-22T09:20:12Z", "locale": "en-US", "shouldLinkResultBeReturned": false }} JSON Output 2: { "version": "1.0", "session": { "new": false, "sessionId": "amzn1.echo-api.session.5e3bb3da-ba51-4422-80cb-c5cace7e3756", "application": { "applicationId": "amzn1.ask.skill.bfb81ac5-d463-4201-b70c-a35f8cc6dbed" }, "user": { "userId": "amzn1.ask.account.AHIAWE37M4SE4Q7DBFIIRLYZYXFKPU42HAD35P5XLHMZA4RGRXFERFRKPAN2I34A56TCC2XEGVNKYH7SW2KVB2NBUYAAY73GRDDXNEFFFY46W2FJXXCLSMAIUWDEUESU3ZMGIYPPYA2WXFXBBHGJBLHNVRYBLXTBLOCJMGOMK4VXNONXGGICYKBBIE7LMCTSUOVEYRAS3E2ATNQ" } }, "context": { "System": { "application": { "applicationId": "amzn1.ask.skill.bfb81ac5-d463-4201-b70c-a35f8cc6dbed" }, "user": { "userId": "amzn1.ask.account.AHIAWE37M4SE4Q7DBFIIRLYZYXFKPU42HAD35P5XLHMZA4RGRXFERFRKPAN2I34A56TCC2XEGVNKYH7SW2KVB2NBUYAAY73GRDDXNEFFFY46W2FJXXCLSMAIUWDEUESU3ZMGIYPPYA2WXFXBBHGJBLHNVRYBLXTBLOCJMGOMK4VXNONXGGICYKBBIE7LMCTSUOVEYRAS3E2ATNQ" }, "device": { "deviceId": "amzn1.ask.device.AHAUYPX373VS2JXBI2E5VG4GPJPAUT5I5KRINQVJCDM7C7MZFGHWSEQV6CKKSHEZQT7HRAIAHS5BRCKLRHDDRTOE3XYWTDOSIW4MKRXAEGZIWA6XQTXY7TRC26PTPZWWB5T6D77XQNDTPLUTKRBOCJ2KLCCYRBUMXLD2GLKU4K2OQXHJDAM4Q", "supportedInterfaces": {} }, "apiEndpoint": "https://api.amazonalexa.com", "apiAccessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJhdWQiOiJodHRwczovL2FwaS5hbWF6b25hbGV4YS5jb20iLCJpc3MiOiJBbGV4YVNraWxsS2l0Iiwic3ViIjoiYW16bjEuYXNrLnNraWxsLmJmYjgxYWM1LWQ0NjMtNDIwMS1iNzBjLWEzNWY4Y2M2ZGJlZCIsImV4cCI6MTU3OTY4NTExMiwiaWF0IjoxNTc5Njg0ODEyLCJuYmYiOjE1Nzk2ODQ4MTIsInByaXZhdGVDbGFpbXMiOnsiY29udGV4dCI6IkFBQUFBQUFBQUFCYkQrVWhLb1dHaUhOOFVsMDhLelhES3dFQUFBQUFBQUFQdkZkcVU4RzczM2QrcU9UZ0I1U1ViMUlBSkwrZFdQTTJnelBZK1V3WE96K3A0K2lrUDhvY1JZZ0c2T0xJdFNrbjNEK0JTNmtCQ1ErMk5xcUFHMW9XdVRaSEczMEU3Z3hFbEF2VlRnNG1DM2lOVmxYOE1USWloLzdtaEt6Q1MrYm1JWjJLbm1IUmxRcjZqRTM4ZlRUdmZDYnZxTTVVVEMrZ21xdzlNeGlTaCtyYjJ4OC82R01ocHVtOGRTZFRDZFpoSEJzbEtib1Q3WjZQMDZuaVhKOFE2TTl6M2pBTmpNZlgyNHg2ckFlU1dlVDVORFZ4NCtaUXVaeFN6UEZtamhhbGpQNnUzWnBHeCtrejFJMHVjZ2pMbS90WTBlZ3ZrUTRyRFVFNzBmTjRDaEZYbWt0UDYxZm12by8xblZSY3dQdTdneHVUbjUvbjlIRGZyaWpoM05iQS9mMkQ1R3kzYnFvTjhSNFBtVEt4eGgxRW9XMGk5SVNpUFdxNEhXQUV3MG83S3U3Nm9xc2NLNW95Ync9PSIsImNvbnNlbnRUb2tlbiI6bnVsbCwiZGV2aWNlSWQiOiJhbXpuMS5hc2suZGV2aWNlLkFIQVVZUFgzNzNWUzJKWEJJMkU1Vkc0R1BKUEFVVDVJNUtSSU5RVkpDRE03QzdNWkZHSFdTRVFWNkNLS1NIRVpRVDdIUkFJQUhTNUJSQ0tMUkhERFJUT0UzWFlXVERPU0lXNE1LUlhBRUdaSVdBNlhRVFhZN1RSQzI2UFRQWldXQjVUNkQ3N1hRTkRUUExVVEtSQk9DSjJLTENDWVJCVU1YTEQyR0xLVTRLMk9RWEhKREFNNFEiLCJ1c2VySWQiOiJhbXpuMS5hc2suYWNjb3VudC5BSElBV0UzN000U0U0UTdEQkZJSVJMWVpZWEZLUFU0MkhBRDM1UDVYTEhNWkE0UkdSWEZFUkZSS1BBTjJJMzRBNTZUQ0MyWEVHVk5LWUg3U1cyS1ZCMk5CVVlBQVk3M0dSRERYTkVGRkZZNDZXMkZKWFhDTFNNQUlVV0RFVUVTVTNaTUdJWVBQWUEyV1hGWEJCSEdKQkxITlZSWUJMWFRCTE9DSk1HT01LNFZYTk9OWEdHSUNZS0JCSUU3TE1DVFNVT1ZFWVJBUzNFMkFUTlEifX0.UV1qiib5UAV4msb27bxN6zBtPnaYg_1ifwWQhuSXNQpDUzM8dQlo29T5O425Itz6M-xufZT5wtJpk-mT2JZUWjdAe8bquTT9YAmAroAp3_Sa-OJ1iXP8qhiPQeu8g7Xwl2XVpFUAuaeqoSyZxzM2dnKBIND18qrcDfDTS9YRzwcrQdBaGlH-_uW0nXDOntyZ7myqB50fBVtlz5xiayHFE5J3-OTaMK4nuggMKzuL8lbYQrcEPwwbt940LiKy4CRjltHA83N1xtyBtkafcOFQPN3UAzFKPI85jUtIFuYUsuIbl7N_f64yOAgtkIQEvjCA-DWQzkerPyHJo2VrF0q7Tw" }, "Viewport": { "experiences": [ { "arcMinuteWidth": 246, "arcMinuteHeight": 144, "canRotate": false, "canResize": false } ], "shape": "RECTANGLE", "pixelWidth": 1024, "pixelHeight": 600, "dpi": 160, "currentPixelWidth": 1024, "currentPixelHeight": 600, "touch": [ "SINGLE" ], "video": { "codecs": [ "H_264_42", "H_264_41" ] } }, "Viewports": [ { "type": "APL", "id": "main", "shape": "RECTANGLE", "dpi": 160, "presentationType": "STANDARD", "canRotate": false, "configuration": { "current": { "video": { "codecs": [ "H_264_42", "H_264_41" ] }, "size": { "type": "DISCRETE", "pixelWidth": 1024, "pixelHeight": 600 } } } } ] }, "request": { "type": "SessionEndedRequest", "requestId": "amzn1.echo-api.request.30c39df8-dc26-4dcf-a193-de432a3a0ab1", "timestamp": "2020-01-22T09:20:13Z", "locale": "en-US", "reason": "ERROR", "error": { "type": "INVALID_RESPONSE", "message": "An exception occurred while dispatching the request to the skill." } }}{ "body": { "version": "1.0", "response": { "type": "_DEFAULT_RESPONSE" }, "sessionAttributes": {}, "userAgent": "ask-node/2.7.0 Node/v8.15.0" } }
How to get a json key that contains a specific string with jq?
I have a json data like this: { "success": true, "module": { "endpoint": { "mode": "pc", "protocolVersion": "2.0" }, "reload": true, "data": { "leftContainer_CL": { "id": "CL", "tag": "leftContainer", "fields": { "css": { "floatPosition": "left", "width": "788px" }, "tag": "leftContainer" }, "type": "container" }, "container_C": { "id": "C", "tag": "container", "fields": { "css": { "marginTop": "12px" }, "tag": "container" }, "type": "container" }, "delivery_dfdaf8a8a": { "id": "dfdaf8a8a", "tag": "delivery", "fields": { "selectPos": "right", "deliveryBy": { "text": "Disediakan oleh", "poster": "ALL ITEM STORE" }, "options": [ { "highlight": false, "deliveryId": "STANDARD", "bgColor": "#fafafa", "price": "Rp18.900", "disable": false, "reachTime": "Dapatkan pada\n 3-4 Apr 2018", "liveUp": false, "selected": true } ], "style": "bar" }, "type": "biz" }, "rightContainer_CR": { "id": "CR", "tag": "rightContainer", "fields": { "css": { "floatPosition": "right", "width": "388px" }, "tag": "rightContainer" }, "type": "container" }, "delivery_d43597338a": { "id": "d43597338a", "tag": "delivery", "fields": { "selectPos": "right", "deliveryBy": { "text": "Disediakan oleh", "poster": "incredible accessories hp" }, "options": [ { "highlight": false, "deliveryId": "STANDARD", "bgColor": "#fafafa", "price": "Rp37.800", "disable": false, "reachTime": "Dapatkan pada\n 3-4 Apr 2018", "liveUp": false, "selected": true } ], "style": "bar" }, "type": "biz" }, "orderSummary_6": { "id": "6", "tag": "orderSummary", "fields": { "isOpen": "false", "summarys": [ { "tail": "(3 barang)", "title": "Subtotal", "value": "Rp23.557" }, { "title": "Biaya pengiriman", "value": "Rp56.700" } ], "title": "Ringkasan Pesanan\r\n" }, "type": "biz" }, "root_0": { "id": "0", "tag": "root", "fields": { "count": 3, "title": "Troli belanja Saya" }, "type": "root" }, "item_i77997d6b": { "id": "i77997d6b", "tag": "item", "fields": { "img": "https://id-live.slatic.net/original/08c1396908dc240625751b09decb4211.jpg", "quantity": { "qtyPrefix": "Kuantitas", "min": 1, "autoOptions": false, "quantity": 1, "max": 5, "editable": true, "showIncrDecr": true, "showOptions": false, "step": 1 }, "sellerName": "ALL ITEM STORE", "title": "Case Slim Black Matte Xiaomi Redmi 4A Softcase Black", "stockTip": {}, "valid": true, "itemId": "143800088", "operations": [ "wishlist", "delete" ], "sellerId": "100124080", "price": { "price": 6000, "currentPrice": "Rp6.000", "originPrice": "Rp30.000", "promotionRatio": "-80%" }, "restriction": false, "isGift": false, "sku": { "skuText": "Softcase, Hitam", "productVariant": "SO908ELAAVYY4AANID-72544754", "brandId": "17818", "skuId": "157608391" }, "itemUrl": "https://www.lazada.co.id/products/i143800088-s157608391.html?urlFlag=true&mp=1", "cartItemId": 2006547819 }, "type": "biz" }, "location_2": { "id": "2", "tag": "location", "fields": { "buttonText": "GANTI\r\n", "editable": true, "postCode": "", "style": "casAddress", "label": "Lokasi", "title": "Jawa Tengah,Kab. Boyolali,Ampel", "addressId": "R2388357-R80010396-R80015219" }, "type": "biz" }, "voucherInput_7": { "id": "7", "tag": "voucherInput", "fields": { "buttonText": "GUNAKAN", "placeHolder": "Masukkan Kode Voucher", "status": "default" }, "type": "biz", "validate": { "value": [ { "msg": "Maaf, voucher ini tidak dapat digunakan. Silahkan periksa jika ada kesalahan penulisan", "regex": "^$|^[ ]{0,5}[A-Za-z0-9~!##%&*()_+?<>{}|-]{1,100}[ ]{0,5}$" } ] } }, "shop_43597338a_s2c": { "id": "43597338a_s2c", "tag": "shop", "fields": { "badges": [], "link": "//www.lazada.co.id/shop/incredible-accessories-hp", "name": "incredible accessories hp" }, "type": "biz" }, "item_i7799f86e": { "id": "i7799f86e", "tag": "item", "fields": { "img": "http://id-live-02.slatic.net/p/2/case-anti-shock-anti-crack-elegant-softcase-for-xiaomi-redmi-5a-white-clear-free-tempered-glass-1273-94487227-9f8ddff53bde3f8de9eb514ba2172361-catalog.jpg", "quantity": { "qtyPrefix": "Kuantitas", "min": 1, "autoOptions": false, "quantity": 1, "max": 5, "editable": true, "showIncrDecr": true, "showOptions": false, "step": 1 }, "sellerName": "incredible accessories hp", "title": "Case Anti Shock / Anti Crack Elegant Softcase for Xiaomi Redmi 5A - White Clear + Free Tempered Glass", "stockTip": {}, "valid": true, "itemId": "160714927", "operations": [ "wishlist", "delete" ], "sellerId": "53631", "price": { "price": 13580, "currentPrice": "Rp13.580", "originPrice": "Rp25.000", "promotionRatio": "-46%" }, "restriction": false, "isGift": false, "sku": { "skuText": "Softcase, Bening", "productVariant": "SO908ELAB716EPANID-97510528", "brandId": "17818", "skuId": "183461134" }, "itemUrl": "https://www.lazada.co.id/products/i160714927-s183461134.html?urlFlag=true&mp=1", "cartItemId": 2006579310 }, "type": "biz" }, "package_p43597338a": { "id": "p43597338a", "tag": "package", "fields": {}, "type": "biz" }, "listHeader_H": { "id": "H", "tag": "listHeader", "fields": { "middle": "HARGA", "left": "3 barang", "right": "KUANTITAS" }, "type": "biz" }, "delivery_3": { "id": "3", "tag": "delivery", "fields": { "selectPos": "left", "options": [ { "highlight": false, "deliveryId": "STANDARD", "bgColor": "#fafafa", "price": "Rp56.700", "disable": false, "icon": "https://laz-img-cdn.alicdn.com/tfs/TB1UpyCpfDH8KJjy1XcXXcpdXXa-72-72.png", "name": "Standar", "reachTime": "Dapatkan pada\n 3-4 Apr 2018", "liveUp": false, "selected": true } ], "style": "card", "title": "Pengiriman yang dipilih" }, "type": "biz" }, "orderTotal_8": { "id": "8", "tag": "orderTotal", "fields": { "button": { "enable": true, "text": "LANJUTKAN KE PEMBAYARAN", "clicked": false }, "payment": { "taxTip": "Termasuk PPN, jika berlaku", "pay": "Rp80.257", "title": "Total" } }, "type": "biz" }, "shop_fdaf8a8a_s23f9": { "id": "fdaf8a8a_s23f9", "tag": "shop", "fields": { "badges": [], "link": "//www.lazada.co.id/shop/all-item-store", "name": "ALL ITEM STORE" }, "type": "biz" }, "floatTips_4": { "id": "4", "tag": "floatTips", "fields": { "tips": [] }, "type": "biz" }, "item_i7790e0f9": { "id": "i7790e0f9", "tag": "item", "fields": { "img": "http://id-live-02.slatic.net/p/2/case-anti-shock-anti-crack-elegant-softcase-for-xiaomi-redmi-note4x-white-clear-8431-85175402-0bec01e88741744ae5461c4b3a4ae160-catalog.jpg", "quantity": { "qtyPrefix": "Kuantitas", "min": 1, "autoOptions": false, "quantity": 1, "max": 5, "editable": true, "showIncrDecr": true, "showOptions": false, "step": 1 }, "sellerName": "incredible accessories hp", "title": "Case Anti Shock / Anti Crack Elegant Softcase for Xiaomi Redmi Note 4x - White Clear", "stockTip": {}, "valid": true, "itemId": "108849535", "operations": [ "wishlist", "delete" ], "sellerId": "53631", "price": { "price": 3977, "currentPrice": "Rp3.977", "originPrice": "Rp15.000", "promotionRatio": "-73%" }, "restriction": false, "isGift": false, "sku": { "skuText": "Sarung, Bening", "productVariant": "CA529ELAAC6GUEANID-27304198", "brandId": "10464", "skuId": "110628148" }, "itemUrl": "https://www.lazada.co.id/products/i108849535-s110628148.html?urlFlag=true&mp=1", "cartItemId": 2005983481 }, "type": "biz" }, "package_pfdaf8a8a": { "id": "pfdaf8a8a", "tag": "package", "fields": {}, "type": "biz" } }, "hierarchy": { "component": [ "container", "delivery", "item", "shop", "package", "listHeader", "orderSummary", "leftContainer", "orderTotal", "floatTips", "root", "location", "rightContainer", "voucherInput" ], "root": "root_0", "structure": { "package_p43597338a": [ "delivery_d43597338a", "shop_43597338a_s2c", "item_i7799f86e", "item_i7790e0f9" ], "leftContainer_CL": [ "delivery_3", "listHeader_H", "package_pfdaf8a8a", "package_p43597338a" ], "container_C": [ "leftContainer_CL", "rightContainer_CR" ], "rightContainer_CR": [ "location_2", "orderSummary_6" ], "orderSummary_6": [ "voucherInput_7", "orderTotal_8" ], "root_0": [ "container_C", "floatTips_4" ], "package_pfdaf8a8a": [ "delivery_dfdaf8a8a", "shop_fdaf8a8a_s23f9", "item_i77997d6b" ] } }, "linkage": { "input": [], "request": [ "voucherInput_7", "item_i7799f86e", "delivery_3", "orderTotal_8", "item_i7790e0f9", "location_2", "item_i77997d6b" ], "common": { "compress": true, "queryParams": "^^$$1afe141216814f45e9fc6dba84d4863d{$_$}H4sIAAAAAAAAAFWU247bRgyGXyXQ9caYGXJOe5fkJmmLot3de4Ez5OwKlSVBklMkQd69lJsNHBgwZIHfz9NPf+t2Wc/DRGN3/61bRtrbvJ67+26p3V230LPoc6V1777fdROd5XGh+vpu05DLJuu7bRuep0OgjrRtf2rYETGfTyN9JabTNfh0nlnG02Xc13k6LbTSeTv9fZH1y1/XZxVbZWJZ3w9ff7xRxXGutA/z9DTs46H6G/1Lb55keqaXu9+pnN68n7/MI43D3bvzIqOKEPMq2/aJNfrBQUrg49uHZIw1kMP/T97ZfPQ3b/sHrUoju+/aoJa8zJNM+/aoDdF+WeXa1TztNEyy9h800jUoDoPFWnMIVHwCMMiWCJ2zgVRX+xw+a2M9aHyMsbpqwcUChTgxeMZqbWzkJXl7G88IPkeARApKMCYQeJNYojCEVPTboMcCmOIvibgxtURXLrRaKGKrWdhHMslkE1ss2TjnCA+ujTPtT8Oy9XgkilVQsgEX2AXJgQ3UZCNb1yKEY1LDLud+iDEbMS0rYwAzx+KbE6JmcgCbs02YJShhyi2TI4eiTAHr0ROiZS0mOteYW9JChZwR+CVPbikce2Ev4HJiJmuab6TJIApIkZo4JFZmlKZb/LmiP66jqzVlEhe5GJEUs/XNk6csxYacDmrY9o9C6rf+oxJAHqAkJMc69RbZu+yBQKxFqTEcxA8r9u5wgagLRISDNuECYjAFk3NYUnU+Htczryr+eDmfSRcUlNEukSyVmqLXeNG9NnWF16RBV95emad5p7FPx5QNGnSUpHDUllsyGINQUKSp78L1Rus/eqb9cmsdgGp1vmpLcKjD1JsNTUGdqmu6olvuxjmlpaa7KV6wtkqU1UimOXA6gIjXk1mH55fbaT8olhJJMhFrrlwxRwuAmK00ELD6+8Dmee9Ndz9dxvGu217mpf9Zb7+5qirZ1YoYOXJlWw1r1Zz1w7kAxKvKlXutVzG4WlFvGUyKxkhB9RNL9ibmmoGTnkJFBT/Pl/oi66dpuex9VMa65LRQ0fRWnDjSZDogFZJkkYL+HfwHDyba3BsFAAA=", "submitParams": "^^$$f7898231e0216a924bcaa64d213a61ba{$_$}H4sIAAAAAAAAADXMQQrDMAwEwL/oHPSA3PqBUsgLto4bDJJtJPvS4L/XCfS2uwx7UoumKUNoPakK2qeY0ko10EIVR5w5wBqNhTI0bhXhv/kk3aM93NORr4MgcH9OdomiLPhiB9+YtexRuEuzkrnCoM5bf2tqr7vQGD8eVpdVjwAAAA==" }, "signature": "89dffd9ca23307e603556a4c896e4c56" } } } With jq I can do this: [me#linux]$ cat /tmp/json | jq '.module | .data | keys' [ "container_C", "delivery_3", "delivery_d43597338a", "delivery_dfdaf8a8a", "floatTips_4", "item_i7790e0f9", "item_i77997d6b", "item_i7799f86e", "leftContainer_CL", "listHeader_H", "location_2", "orderSummary_6", "orderTotal_8", "package_p43597338a", "package_pfdaf8a8a", "rightContainer_CR", "root_0", "shop_43597338a_s2c", "shop_fdaf8a8a_s23f9", "voucherInput_7" ] I need to get orderTotal_8 but please note that the number 8 is always changing, so it can be orderTotal_10 or orderTotal_3 etc... How can I get this key with pure jq command if possible, without the help of grep / awk ? So the result should be like this orderTotal_8
If you want to form a subarray of items satisfying some condition, just add map(select( CONDITION )) to the pipeline, e.g. .module | .data | keys | map(select(test("^orderTotal_"))) If you just want a stream of the items matching the condition, then you could first form the stream, and then make the selection: .module | .data | keys[] | select(test("^orderTotal_")) For efficiency and other reasons, you might want to consider using keys_unsorted instead of keys.
"forcePullImage" param gets set to 'false'
I am trying to build a docker image with Marathon, however when I use this configuration, the "forcePullImage" param gets set to 'false' { "id": "name", "mem": 1024, "cpus": 0.5, "instances": 1, "container": { "type": "DOCKER", "volumes": [ { "containerPath": "/etc/localtime", "hostPath": "/etc/localtime", "mode": "RO" } ], "docker": { "image": "dockerimage", "network": "BRIDGE", "portMappings": [ { "containerPort": 8080, "hostPort": 0, "servicePort": [PORTNUMBER], "protocol": "tcp", "name": "name" }], "parameters": [{ "key": "name", "value": "name" }] }, "forcePullImage": true }, "healthChecks": [ { "path": "~/check/", "portIndex": 0, "protocol": "HTTP", "gracePeriodSeconds": 10, "intervalSeconds": 2, "timeoutSeconds": 10, "maxConsecutiveFailures": 10 }], "labels":{ "HAPROXY_GROUP":"external" } } When it is finally build in the marathon enviroment the config file gets set to this: { "id": "name", "mem": 1024, "cpus": 0.5, "instances": 1, "container": { "type": "DOCKER", "volumes": [ { "containerPath": "/etc/localtime", "hostPath": "/etc/localtime", "mode": "RO" } ], "docker": { "image": "dockerimage", "network": "BRIDGE", "portMappings": [ { "containerPort": 8080, "hostPort": 0, "servicePort": [PORTNUMBER], "protocol": "tcp", "name": "name" }], "parameters": [{ "key": "name", "value": "name" }] }, "forcePullImage": false }, "healthChecks": [ { "path": "~/check/", "portIndex": 0, "protocol": "HTTP", "gracePeriodSeconds": 10, "intervalSeconds": 2, "timeoutSeconds": 10, "maxConsecutiveFailures": 10 }], "labels":{ "HAPROXY_GROUP":"external" } } After it is build I have to manually change the 'false' param to 'true' and after that it actually works, but why is it getting set to false when adding it to marathon and how can I fix this problem?
The Marathon app spec you posted is in fact invalid. If you look at the schema you see that forcePullImage has to be a child of the docker field (not the container field as in your example). The correct usage would be: "docker": { "image": "dockerimage", "forcePullImage": false, ... }
Drupal 7 Feed Import
I am now struggling for hours but I cannot get my feed import to run properly. The strange is, that I can import data for the normal fields in Drupal like "Title" or "Language" or "User". But for my custom fields like "field_produkt_beschreibung", no entries are made in Drupal. Even if I supply a Standard Value for the field: The standard value is not saved in the node. { "entity": "node", "settings": { "uniq_path": "SKU", "preprocess": "", "feed": { "protect_on_invalid_source": 0, "protect_on_fewer_items": "0" }, "processor": { "name": "default", "class": "FeedImportProcessor", "options": { "items_count": "0", "skip_imported": 0, "updates_only": 0, "reset_cache": "0", "throw_exception": 1, "max_reported_errors": "100", "break_on_undefined_filter": 0, "skip_defined_functions_check": 0, "uniq_callback": "", "after_save": "", "before_combine": "", "after_combine": "", "before_create": "", "before_save": "" } }, "reader": { "name": "sql", "class": "SQLFIReader", "options": { "dsn": "mysql:dbname=d****7;host=localhost", "user": "d******7", "pass": "*****", "query": "SELECT * FROM mytable", "params": "" } }, "hashes": { "name": "sql", "class": "FeedImportSQLHashes", "options": { "ttl": 0, "insert_chunk": 300, "update_chunk": 300, "group": "produkte_h_lter" } }, "filter": { "name": "default", "class": "FeedImportMultiFilter", "options": { "param": "[field]", "include": "" } }, "fields": { "title": { "field": "title", "column": false, "paths": [ "Produktname" ], "default_action": 0, "default_value": "Standardwert", "update_mode": 0, "filters": { "\u00fc": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ü", "\u00fc", "1" ] }, "\u00e4": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ä", "\u00e4", "1" ] }, "\u00d6": { "function": "FeedImportFilter::replace", "params": [ "[field]", "Ö", "\u00d6", "1" ] }, "\u00f6": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ö", "\u00f6", "1" ] }, "\u00df": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ß", "\u00df", "1" ] }, "R": { "function": "FeedImportFilter::replace", "params": [ "[field]", "®", " ", "1" ] } }, "prefilters": [] }, "field_produkt_hersteller_raw": { "field": "field_produkt_hersteller_raw", "column": true, "paths": [ "//Hersteller" ], "default_action": 0, "default_value": "kein Hersteller", "update_mode": 0, "filters": [], "prefilters": [] }, "field_produkt_link": { "field": "field_produkt_link", "column": true, "paths": [ "Link" ], "default_action": 0, "default_value": "Standard", "update_mode": 0, "filters": [], "prefilters": [] }, "field_produkt_artikelnummer": { "field": "field_produkt_artikelnummer", "column": true, "paths": [ "Artikelnummer" ], "default_action": 0, "default_value": "Standardwert", "update_mode": 0, "filters": [], "prefilters": [] }, "field_produkt_beschreibung": { "field": "field_produkt_beschreibung", "column": true, "paths": [ "Beschreibung" ], "default_action": 0, "default_value": "Text", "update_mode": 0, "filters": { "\u00fc": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ü", "\u00fc", "1" ] }, "\u00e4": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ä", "\u00e4", "1" ] }, "\u00d6": { "function": "FeedImportFilter::replace", "params": [ "[field]", "Ö", "\u00d6", "1" ] }, "\u00f6": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ö", "\u00f6", "1" ] }, "\u00df": { "function": "FeedImportFilter::replace", "params": [ "[field]", "ß", "\u00df", "1" ] }, "R": { "function": "FeedImportFilter::replace", "params": [ "[field]", "®", " ", "1" ] } }, "prefilters": [] } }, "static_fields": { "type": "produkt", "uid": "3", "language": "de", "field_produkt_shop": { "tid": "20" }, "title": "Test" }, "functions": [] } } I really would appreciate a hint, about what might be wrong with my setup. Thank you very much, Simon
It was missing filters and umlaute (ä, ö...) in the text fields. It is working now