IBM Watson conversation: How to access JSON object from context variable? The Next CEO of Stack OverflowHow do I turn a C# object into a JSON string in .NET?How do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?Multiple answers for a node in IBM Watson Conversation serviceStemming and stopwords on IBM Watson Conversation serviceIBM Watson Conversation with existing Database integrationOpen URL in IBM Watson conversationIBM watson Discovery + ConversationIBM Watson Conversation: How to dynamically create context variables?Conditionally set a context in Watson ConversationHow to remove a context variable in Watson Conversation service on IBM Cloud
Is it okay to store user locations?
Why didn't Khan get resurrected in the Genesis Explosion?
Increase performance creating Mandelbrot set in python
What makes a siege story/plot interesting?
What is the point of a new vote on May's deal when the indicative votes suggest she will not win?
How to make a variable always equal to the result of some calculations?
MAZDA 3 2006 (UK) - poor acceleration then takes off at 3250 revs
Which organization defines CJK Unified Ideographs?
Are there languages with no euphemisms?
How to make a software documentation "officially" citable?
Can a single photon have an energy density?
How easy is it to start Magic from scratch?
Describing a person. What needs to be mentioned?
How to count occurrences of text in a file?
How did people program for Consoles with multiple CPUs?
How do we know the LHC results are robust?
Why does C# sound extremely flat when saxophone is tuned to G?
India just shot down a satellite from the ground. At what altitude range is the resulting debris field?
How do scammers retract money, while you can’t?
Visit to the USA with ESTA approved before trip to Iran
When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
Should I tutor a student who I know has cheated on their homework?
Too much space between section and text in a twocolumn document
IBM Watson conversation: How to access JSON object from context variable?
The Next CEO of Stack OverflowHow do I turn a C# object into a JSON string in .NET?How do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?Multiple answers for a node in IBM Watson Conversation serviceStemming and stopwords on IBM Watson Conversation serviceIBM Watson Conversation with existing Database integrationOpen URL in IBM Watson conversationIBM watson Discovery + ConversationIBM Watson Conversation: How to dynamically create context variables?Conditionally set a context in Watson ConversationHow to remove a context variable in Watson Conversation service on IBM Cloud
I made a chatbot which takes 'place' as input and connects to an external API service passing the 'place' as a parameter. The API service returns a list of all available airport details for the given place as a JSON object.
For example, if 'Berlin' is given as input in conversation, The API returns following JSON object, which is then stored in the context variable $TheResult,
The context variable $TheResult holds the following JSON object as the value when the input is 'Berlin',
"message":
"Places": [
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "BERL-sky",
"PlaceName": "Berlin",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "TXL-sky",
"PlaceName": "Berlin Tegel",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "SXF-sky",
"PlaceName": "Berlin Schoenefeld",
"RegionId": ""
,
"CityId": "BTVA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BTV-sky",
"PlaceName": "Burlington",
"RegionId": "VT"
,
"CityId": "BLIA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BLI-sky",
"PlaceName": "Bellingham",
"RegionId": "WA"
,
"CityId": "BRLA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BRL-sky",
"PlaceName": "Burlington",
"RegionId": "IA"
]
,
"parameters":
"context": "",
"message": "",
"service": "https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/autosuggest/v1.0/FI/EUR/en-US/?query=Berlin"
When I use the respond text as Response from external server: $TheResult.message.Places
, it generates the following output,
Response from external server:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"]
I have to access the first 'CityId' from the JSON object and display it as the output, in the case of Berlin as input, the expected output is,
The first airport city id is: BERL-sky
I tried the respond text, The first airport city id is: $TheResult.message.Places.CityId
it throws following dialog node error
Error when updating output with output of dialog
node id [node_1_1551877430730]. Node output is
["generic":["values":["text":"Response from external server:
$TheResult.message.Places.CityId"],"response_type":"text","selection_policy":"sequential"]]
SpEL evaluation error: Expression [ $TheResult.message.Places.CityId ]
converted to [ context['TheResult'].message.Places.CityId ] at
position 37: EL1008E: Property or field 'CityId' cannot be found on
object of type 'JsonArray' - maybe not public?
and the respond text,The first airport city id is: $TheResult.message.Places[0].CityId
also didn't work. It didn't generate any error, but displays the same output as above only appending extra [0].CityId at the end.
The first airport city id is:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"][0].CityId
How should I parse this JSON object to access the individual key-value pairs?
Thanks in advance, I can elaborate the question further if necessary!!
json ibm-watson watson-conversation
add a comment |
I made a chatbot which takes 'place' as input and connects to an external API service passing the 'place' as a parameter. The API service returns a list of all available airport details for the given place as a JSON object.
For example, if 'Berlin' is given as input in conversation, The API returns following JSON object, which is then stored in the context variable $TheResult,
The context variable $TheResult holds the following JSON object as the value when the input is 'Berlin',
"message":
"Places": [
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "BERL-sky",
"PlaceName": "Berlin",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "TXL-sky",
"PlaceName": "Berlin Tegel",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "SXF-sky",
"PlaceName": "Berlin Schoenefeld",
"RegionId": ""
,
"CityId": "BTVA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BTV-sky",
"PlaceName": "Burlington",
"RegionId": "VT"
,
"CityId": "BLIA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BLI-sky",
"PlaceName": "Bellingham",
"RegionId": "WA"
,
"CityId": "BRLA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BRL-sky",
"PlaceName": "Burlington",
"RegionId": "IA"
]
,
"parameters":
"context": "",
"message": "",
"service": "https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/autosuggest/v1.0/FI/EUR/en-US/?query=Berlin"
When I use the respond text as Response from external server: $TheResult.message.Places
, it generates the following output,
Response from external server:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"]
I have to access the first 'CityId' from the JSON object and display it as the output, in the case of Berlin as input, the expected output is,
The first airport city id is: BERL-sky
I tried the respond text, The first airport city id is: $TheResult.message.Places.CityId
it throws following dialog node error
Error when updating output with output of dialog
node id [node_1_1551877430730]. Node output is
["generic":["values":["text":"Response from external server:
$TheResult.message.Places.CityId"],"response_type":"text","selection_policy":"sequential"]]
SpEL evaluation error: Expression [ $TheResult.message.Places.CityId ]
converted to [ context['TheResult'].message.Places.CityId ] at
position 37: EL1008E: Property or field 'CityId' cannot be found on
object of type 'JsonArray' - maybe not public?
and the respond text,The first airport city id is: $TheResult.message.Places[0].CityId
also didn't work. It didn't generate any error, but displays the same output as above only appending extra [0].CityId at the end.
The first airport city id is:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"][0].CityId
How should I parse this JSON object to access the individual key-value pairs?
Thanks in advance, I can elaborate the question further if necessary!!
json ibm-watson watson-conversation
You use CityID in the response, but the JSON data says CityId. Did you try it with CityId...?
– data_henrik
Mar 8 at 15:03
Sorry, my mistake while writing the question here, I double checked with CityId for both variations with no success.
– Chandan Rg
Mar 8 at 16:05
add a comment |
I made a chatbot which takes 'place' as input and connects to an external API service passing the 'place' as a parameter. The API service returns a list of all available airport details for the given place as a JSON object.
For example, if 'Berlin' is given as input in conversation, The API returns following JSON object, which is then stored in the context variable $TheResult,
The context variable $TheResult holds the following JSON object as the value when the input is 'Berlin',
"message":
"Places": [
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "BERL-sky",
"PlaceName": "Berlin",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "TXL-sky",
"PlaceName": "Berlin Tegel",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "SXF-sky",
"PlaceName": "Berlin Schoenefeld",
"RegionId": ""
,
"CityId": "BTVA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BTV-sky",
"PlaceName": "Burlington",
"RegionId": "VT"
,
"CityId": "BLIA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BLI-sky",
"PlaceName": "Bellingham",
"RegionId": "WA"
,
"CityId": "BRLA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BRL-sky",
"PlaceName": "Burlington",
"RegionId": "IA"
]
,
"parameters":
"context": "",
"message": "",
"service": "https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/autosuggest/v1.0/FI/EUR/en-US/?query=Berlin"
When I use the respond text as Response from external server: $TheResult.message.Places
, it generates the following output,
Response from external server:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"]
I have to access the first 'CityId' from the JSON object and display it as the output, in the case of Berlin as input, the expected output is,
The first airport city id is: BERL-sky
I tried the respond text, The first airport city id is: $TheResult.message.Places.CityId
it throws following dialog node error
Error when updating output with output of dialog
node id [node_1_1551877430730]. Node output is
["generic":["values":["text":"Response from external server:
$TheResult.message.Places.CityId"],"response_type":"text","selection_policy":"sequential"]]
SpEL evaluation error: Expression [ $TheResult.message.Places.CityId ]
converted to [ context['TheResult'].message.Places.CityId ] at
position 37: EL1008E: Property or field 'CityId' cannot be found on
object of type 'JsonArray' - maybe not public?
and the respond text,The first airport city id is: $TheResult.message.Places[0].CityId
also didn't work. It didn't generate any error, but displays the same output as above only appending extra [0].CityId at the end.
The first airport city id is:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"][0].CityId
How should I parse this JSON object to access the individual key-value pairs?
Thanks in advance, I can elaborate the question further if necessary!!
json ibm-watson watson-conversation
I made a chatbot which takes 'place' as input and connects to an external API service passing the 'place' as a parameter. The API service returns a list of all available airport details for the given place as a JSON object.
For example, if 'Berlin' is given as input in conversation, The API returns following JSON object, which is then stored in the context variable $TheResult,
The context variable $TheResult holds the following JSON object as the value when the input is 'Berlin',
"message":
"Places": [
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "BERL-sky",
"PlaceName": "Berlin",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "TXL-sky",
"PlaceName": "Berlin Tegel",
"RegionId": ""
,
"CityId": "BERL-sky",
"CountryId": "DE-sky",
"CountryName": "Germany",
"PlaceId": "SXF-sky",
"PlaceName": "Berlin Schoenefeld",
"RegionId": ""
,
"CityId": "BTVA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BTV-sky",
"PlaceName": "Burlington",
"RegionId": "VT"
,
"CityId": "BLIA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BLI-sky",
"PlaceName": "Bellingham",
"RegionId": "WA"
,
"CityId": "BRLA-sky",
"CountryId": "US-sky",
"CountryName": "United States",
"PlaceId": "BRL-sky",
"PlaceName": "Burlington",
"RegionId": "IA"
]
,
"parameters":
"context": "",
"message": "",
"service": "https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/autosuggest/v1.0/FI/EUR/en-US/?query=Berlin"
When I use the respond text as Response from external server: $TheResult.message.Places
, it generates the following output,
Response from external server:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"]
I have to access the first 'CityId' from the JSON object and display it as the output, in the case of Berlin as input, the expected output is,
The first airport city id is: BERL-sky
I tried the respond text, The first airport city id is: $TheResult.message.Places.CityId
it throws following dialog node error
Error when updating output with output of dialog
node id [node_1_1551877430730]. Node output is
["generic":["values":["text":"Response from external server:
$TheResult.message.Places.CityId"],"response_type":"text","selection_policy":"sequential"]]
SpEL evaluation error: Expression [ $TheResult.message.Places.CityId ]
converted to [ context['TheResult'].message.Places.CityId ] at
position 37: EL1008E: Property or field 'CityId' cannot be found on
object of type 'JsonArray' - maybe not public?
and the respond text,The first airport city id is: $TheResult.message.Places[0].CityId
also didn't work. It didn't generate any error, but displays the same output as above only appending extra [0].CityId at the end.
The first airport city id is:
["CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"BERL-sky","PlaceName":"Berlin","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"TXL-sky","PlaceName":"Berlin
Tegel","RegionId":"","CityId":"BERL-sky","CountryId":"DE-sky","CountryName":"Germany","PlaceId":"SXF-sky","PlaceName":"Berlin
Schoenefeld","RegionId":"","CityId":"BTVA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BTV-sky","PlaceName":"Burlington","RegionId":"VT","CityId":"BLIA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BLI-sky","PlaceName":"Bellingham","RegionId":"WA","CityId":"BRLA-sky","CountryId":"US-sky","CountryName":"United
States","PlaceId":"BRL-sky","PlaceName":"Burlington","RegionId":"IA"][0].CityId
How should I parse this JSON object to access the individual key-value pairs?
Thanks in advance, I can elaborate the question further if necessary!!
json ibm-watson watson-conversation
json ibm-watson watson-conversation
edited Mar 8 at 16:06
Chandan Rg
asked Mar 8 at 13:07
Chandan RgChandan Rg
6518
6518
You use CityID in the response, but the JSON data says CityId. Did you try it with CityId...?
– data_henrik
Mar 8 at 15:03
Sorry, my mistake while writing the question here, I double checked with CityId for both variations with no success.
– Chandan Rg
Mar 8 at 16:05
add a comment |
You use CityID in the response, but the JSON data says CityId. Did you try it with CityId...?
– data_henrik
Mar 8 at 15:03
Sorry, my mistake while writing the question here, I double checked with CityId for both variations with no success.
– Chandan Rg
Mar 8 at 16:05
You use CityID in the response, but the JSON data says CityId. Did you try it with CityId...?
– data_henrik
Mar 8 at 15:03
You use CityID in the response, but the JSON data says CityId. Did you try it with CityId...?
– data_henrik
Mar 8 at 15:03
Sorry, my mistake while writing the question here, I double checked with CityId for both variations with no success.
– Chandan Rg
Mar 8 at 16:05
Sorry, my mistake while writing the question here, I double checked with CityId for both variations with no success.
– Chandan Rg
Mar 8 at 16:05
add a comment |
1 Answer
1
active
oldest
votes
Try to put your JSON path expression into the expression syntax. There you can use the full syntax. Something like this:
The first airport code is <? $TheResult.message.Places[0].CityId ?>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55063874%2fibm-watson-conversation-how-to-access-json-object-from-context-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try to put your JSON path expression into the expression syntax. There you can use the full syntax. Something like this:
The first airport code is <? $TheResult.message.Places[0].CityId ?>
add a comment |
Try to put your JSON path expression into the expression syntax. There you can use the full syntax. Something like this:
The first airport code is <? $TheResult.message.Places[0].CityId ?>
add a comment |
Try to put your JSON path expression into the expression syntax. There you can use the full syntax. Something like this:
The first airport code is <? $TheResult.message.Places[0].CityId ?>
Try to put your JSON path expression into the expression syntax. There you can use the full syntax. Something like this:
The first airport code is <? $TheResult.message.Places[0].CityId ?>
answered Mar 8 at 17:21
data_henrikdata_henrik
9,47721031
9,47721031
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55063874%2fibm-watson-conversation-how-to-access-json-object-from-context-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You use CityID in the response, but the JSON data says CityId. Did you try it with CityId...?
– data_henrik
Mar 8 at 15:03
Sorry, my mistake while writing the question here, I double checked with CityId for both variations with no success.
– Chandan Rg
Mar 8 at 16:05