Logstash nested array JSON parsing - json

I have a JSON log of my application which contains elements in a nested array form, here is the sample of it:-
{
"msgs": [{
"ts": "2017-09-04T07:07:45.6229372Z",
"tid": 25,
"eid": 1,
"lvl": "Information",
"cat": "Microsoft.AspNetCore.Hosting.Internal.WebHost",
"msg": {
"cnt": "Request starting HTTP/1.1 POST http://localhost:20001/Processor text/xml; charset=utf-8 685",
"Protocol": "HTTP/1.1",
"Method": "POST",
"ContentType": "text/xml; charset=utf-8",
"ContentLength": 685,
"Scheme": "http",
"Host": "localhost:20001",
"PathBase": "",
"Path": "/Processor",
"QueryString": ""
}
},
{
"ts": "2017-09-04T07:07:45.6229372Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.Service.ServiceHostMiddleware",
"msg": {
"cnt": "REQ"
},
"data": {
"Headers": {
"Connection": "Keep-Alive",
"Content-Length": "685",
"Content-Type": "text/xml; charset=utf-8",
"Accept-Encoding": "gzip, deflate",
"Expect": "100-continue",
"Host": "localhost:20001",
"SOAPAction": "\"http://servereps.mtxeps.com/TransactionService/SendTransaction\""
}
}
},
{
"ts": "2017-09-04T07:07:45.6239372Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.GatewayService.ProcessorTransactionService",
"msg": {
"cnt": "REQ"
},
"data": {
"Trace": "Aa10031<1C>Ab1<1C>Ac000101<1C>Ad20170616145857<1C>Ae10011<1C>AhVT00009<1C>ArY<1C>Be1812<1C>BfS<1C>BnDB<1C>Bo400296<1C>Bp4803<1C>BqDebit Card<1C>Br16<1C>Da300<1C>Dc0<1C>Dk840<1C>Ga01<1C>Gb1<1C>GfG<1C>GhB/GsF>O<1C>GkOE1<1C>Ia7325980B6B284759<1C>Ib8765432100324A00313<1C>Ic0043<1C>Ig3|1|MX2015-06<1C>IjgnkA7MdNlE2EB1c2B3jlz1G3Kf2U5S3x2H9W6ldIY7QpmlUzYcNHGg==|FFFF987654323D2007CD<1C>Nc5<1C>Oa18"
}
},
{
"ts": "2017-09-04T07:07:45.6249373Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.GatewayService.TransactionProcessingEngine",
"msg": {
"cnt": "REQ"
},
"data": {
"request": {
"Version": "1.0",
"Server": {
"LogicalDatacenterId": 0,
"PhysicalDatacenterId": 0,
"UniqueId": "G00008D4F35EDADCD368",
"UniversalTimestamp": "2017-09-04T07:07:45.6249373Z"
},
"State": {
"Status": "InFlight"
},
"Tenant": {
"CompanyNumber": 10031,
"StoreNumber": 1,
"HostType": {
"Code": 7,
"Name": "ProdConcordHC"
},
"MerchantNumber": "",
"TerminalId": ""
},
"PointOfInteraction": {
"Client": {
"Type": "OpenEPS",
"CardType": "DB",
"CardName": "Debit Card",
"CommandSequence": "B/GsF>O"
},
"Lane": {
"Type": "Attended",
"Number": 1
},
"Terminal": {
"EMVCapabilities": "FullEMV",
"SerialNumber": "0043"
},
"PointOfSale": {
"ReferenceNumber": "VT00009",
"CashierNumber": "1"
},
"LocalTimestamp": "2017-06-16T14:58:57"
},
"Request": {
"MessageType": {
"Code": 0,
"Name": "Standard"
},
"TenderType": {
"Code": 1,
"Name": "Debit"
},
"TransactionType": {
"Code": 1,
"Name": "Purchase"
},
"EntryMode": "Swiped",
"AuditId": 10011,
"CardType": {
"TenderType": {
"Code": 0,
"Name": "Unknown"
},
"Code": 0,
"Name": "Unknown"
},
"AccountNumberFirstSix": "400296",
"AccountNumberLastFour": "4803",
"AccountNumberLength": 16,
"Card": {
"EncryptedTrack": {
"EncryptionType": "Hardware",
"EncryptionKeySerialNumber": "FFFF987654323D2007CD",
"EncryptedValue": "gnkA7MdNlE2EB1c2B3jlz1G3Kf2U5S3x2H9W6ldIY7QpmlUzYcNHGg=="
},
"EncryptedPIN": {
"EncryptionType": "PassThrough",
"EncryptionKeySerialNumber": "8765432100324A00313",
"EncryptedValue": "7325980B6B284759"
}
},
"Currency": {
"Number": 840
},
"Amount": 3.0,
"CashbackAmount": 0.0,
"AllowPartialAuthorization": true,
"Host": {
"HostType": {
"Code": 7,
"Name": "ProdConcordHC"
},
"Values": {
"HostProfileId": 1,
"CompanyNumber": 10031,
"StoreNumber": 1,
"StoreProfileId": 1,
"NumericStateCode": 0,
"AlphaStateCode": "NH",
"CheckAuthService": "3"
}
}
},
"Trace": {
"Path": [{
"Type": "OpenEPS",
"Value": "OE1"
},
{
"NodeId": 0,
"Type": "Gateway",
"Value": "GAT"
},
{
"NodeId": 0,
"ElapsedSeconds": 0.7458587,
"Type": "Tenant",
"Value": "TEN"
}]
}
},
"timeoutInMilliseconds": 45000
}
},
{
"ts": "2017-09-04T07:07:45.6259373Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.SDK.TenantResolutionClient",
"msg": {
"cnt": "SEND"
},
"data": {
"RequestUri": "http://153.71.66.148:20002/TenantConfigurationService/v1/Resolution",
"Method": "POST",
"Headers": {
"Date": "Mon, 04 Sep 2017 07:07:45 GMT",
"User-Agent": "ConnectedPayments/1.0",
"x-ms-request-root-id": "6627de44-43a027c7567ddccd",
"x-ms-request-id": "|6627de44-43a027c7567ddccd.1.",
"Request-Id": "|6627de44-43a027c7567ddccd.1.",
"Correlation-Context": "UniqueId=G00008D4F35EDADCD368",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "181"
}
}
},
{
"ts": "2017-09-04T07:07:46.37098Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.SDK.TenantResolutionClient",
"msg": {
"cnt": "RECV"
},
"data": {
"StatusCode": 200,
"ReasonPhrase": "OK",
"Headers": {
"Date": "Mon, 04 Sep 2017 07:07:46 GMT",
"Transfer-Encoding": "chunked",
"X-Unique-Id": "G00008D4F35EDADCD368",
"X-Node-Id": "0",
"Content-Type": "application/json; charset=utf-8"
}
}
},
{
"ts": "2017-09-04T07:07:46.37098Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.GatewayService.TransactionProcessingEngine",
"msg": {
"cnt": "Resolution performed."
},
"data": {
"Response": {
"Content": {
"Company": {
"Number": 10031,
"Name": "Sprouts"
},
"TransactionProfile": {
"TransactionProfileId": 1,
"CompanyNumber": 10031,
"Number": 1000,
"Description": "Transaction Profile 1000"
},
"TransactionValidation": {
"TransactionValidationId": 1,
"TransactionProfileId": 1,
"MessageTypeCode": 0,
"TenderTypeCode": 1,
"TransactionTypeCode": 1,
"CardTypeCode": 0
},
"Store": {
"Number": 1,
"Name": "Store 1",
"QueueLaneNumber": 0
},
"StoreProfile": {
"StoreProfileId": 1,
"CompanyNumber": 10031,
"StoreNumber": 1,
"TransactionProfileId": 1,
"HostTypeCode": 7,
"MerchantNumber": "",
"TerminalId": ""
},
"HostProfile": {
"HostProfileId": 1,
"CompanyNumber": 10031,
"StoreNumber": 1,
"StoreProfileId": 1,
"NumericStateCode": 0,
"AlphaStateCode": "NH",
"CheckAuthService": "3"
}
},
"NodeId": 0,
"StatusCode": 200
},
"ElapsedSeconds": 0.7458587
}
},
{
"ts": "2017-09-04T07:07:46.37198Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.SDK.TransactionAuthorizationClient",
"msg": {
"cnt": "SEND"
},
"data": {
"RequestUri": "http://ser22vvm211:8082/OrchestrationService/v1/Authorization",
"Method": "POST",
"Headers": {
"Date": "Mon, 04 Sep 2017 07:07:46 GMT",
"User-Agent": "ConnectedPayments/1.0",
"x-ms-request-root-id": "6627de44-43a027c7567ddccd",
"x-ms-request-id": "|6627de44-43a027c7567ddccd.2.",
"Request-Id": "|6627de44-43a027c7567ddccd.2.",
"Correlation-Context": "UniqueId=G00008D4F35EDADCD368",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "1821"
}
}
},
{
"ts": "2017-09-04T07:07:49.8941815Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.SDK.TransactionAuthorizationClient",
"msg": {
"cnt": "RECV"
},
"data": {
"StatusCode": 200,
"ReasonPhrase": "OK",
"Headers": {
"Date": "Mon, 04 Sep 2017 07:07:49 GMT",
"Server": "Apache-Coyote/1.1",
"Content-Length": "1672",
"Content-Type": "application/json"
}
}
},
{
"ts": "2017-09-04T07:07:49.8951815Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.GatewayService.TransactionProcessingEngine",
"msg": {
"cnt": "RSP"
},
"data": {
"ResponseTransaction": {
"Version": null,
"Server": {
"LogicalDatacenterId": 0,
"PhysicalDatacenterId": 0,
"TransactionId": 10909,
"UniqueId": "G00008D4F35EDADCD368",
"UniversalTimestamp": "2017-09-04T07:07:45.6249373Z"
},
"State": null,
"Tenant": {
"CompanyNumber": 10031,
"StoreNumber": 1,
"HostType": {
"Code": 7,
"Name": "ProdConcordHC"
},
"MerchantNumber": "",
"TerminalId": ""
},
"PointOfInteraction": {
"Client": {
"Type": "B/GsF>O",
"CardType": "DB",
"CardName": "Debit Card",
"CommandSequence": "B/GsF>O",
"Version": null
},
"Lane": {
"Type": "Attended",
"Number": 1
},
"Terminal": {
"EMVCapabilities": "Contact, ContactlessDisabled",
"Type": null,
"SerialNumber": null,
"EMVKernelVersion": null,
"EMVIdentifierCAPK": null,
"PINCapabilities": null
},
"PointOfSale": {
"CashierNumber": "1",
"ReferenceNumber": null
},
"LocalTimestamp": "2017-06-16T14:58:57",
"LocalTimeZoneOffset": null
},
"Request": {
"MessageType": null,
"EntryMode": null,
"CashbackAmount": 0.00,
"AllowPartialAuthorization": true,
"TenderType": null,
"TransactionType": null,
"ReversalType": null,
"ReferenceId": null,
"AuditId": null,
"AccountNumberFirstSix": null,
"AccountNumberLastFour": null,
"AccountNumberLength": null,
"CardType": null,
"PreviousTransaction": null,
"Card": null,
"Check": null,
"Identification": null,
"Currency": null,
"Amount": null,
"TipAmount": null,
"Host": null
},
"Response": {
"ErrorCode": 96,
"ErrorMessage": "E2G",
"IsApproved": false,
"ResponseCode": "96",
"HostResponseCode": "E2G",
"HostResponseMessage": "EDIT ER:OPT DATA",
"ApprovedAmount": 0.00,
"ApprovedCashbackAmount": 0.0,
"IsApprovedLocally": false,
"AuthorizationCode": null,
"ResponseMessage": null,
"BalanceAmount": null,
"Check": null,
"Currency": null,
"Card": null,
"Host": null
},
"Trace": {
"ElapsedSeconds": 4.2694351,
"Path": [{
"NodeId": 0,
"ElapsedSeconds": 4.2694351,
"Type": "Gateway",
"Value": "GAT"
}]
},
"Queue": null,
"SensitiveData": null,
"PreviousTransaction": null,
"Trace": null
}
}
},
{
"ts": "2017-09-04T07:07:49.8951815Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.GatewayService.ProcessorTransactionService",
"msg": {
"cnt": "RSP"
},
"data": {
"Trace": "Aa10031<1C>Ab1<1C>Ac000101<1C>Ad20170616145857<1C>Ae10011<1C>Af96<1C>ArY<1C>BnDB<1C>BqDebit Card<1C>Db0<1C>Dc0<1C>Ga1<1C>Gb1<1C>GfG<1C>GhB/GsF>O<1C>GkGAT<1C>Jb96<1C>Ka7<1C>MbE2G<1C>Mg0<1C>Nc5<1C>Ya10909<1C>Yb0<1C>YcG00008D4F35EDADCD368"
}
},
{
"ts": "2017-09-04T07:07:49.8951815Z",
"tid": 25,
"lvl": "Information",
"cat": "NCR.CP.Service.ServiceHostMiddleware",
"msg": {
"cnt": "RSP"
},
"data": {
"Headers": {
"Date": "Mon, 04 Sep 2017 07:07:49 GMT",
"Transfer-Encoding": "chunked",
"Content-Type": "text/xml; charset=utf-8",
"X-Unique-Id": "G00008D4F35EDADCD368",
"X-Node-Id": "0"
}
}
},
{
"ts": "2017-09-04T07:07:49.8951815Z",
"tid": 25,
"eid": 2,
"lvl": "Information",
"cat": "Microsoft.AspNetCore.Hosting.Internal.WebHost",
"msg": {
"cnt": "Request finished in 4272.8738ms 200 text/xml; charset=utf-8",
"ElapsedMilliseconds": 4272.8738,
"StatusCode": 200,
"ContentType": "text/xml; charset=utf-8"
}
}],
"RequestId": "G00008D4F35EDADCD368",
"RequestPath": "/Processor",
"Action": "http://servereps.mtxeps.com/TransactionService/SendTransaction",
"Contract": "NCR.CP.GatewayService.IProcessorTransactionContract",
"OperationName": "SendTransaction",
"MethodName": "SendTransaction"
}
Here "msgs" element contains nested array object into it, so to create field of every elements inside the array object i had followed the mutate and split approach both:-
Mutate filter:-
mutate {
add_field => {
"ts" => "%{[doc][msgs][0][ts]}"
"tid1" => "%{[doc][msgs][0][tid]}"
"eid1" => "%{[doc][msgs][0][eid]}"
"lvl1" => "%{[doc][msgs][0][lvl]}"
"cat1" => "%{[doc][msgs][0][cat]}"
"msg1" => "%{[doc][msgs][0][msg]}"
"data" => "%{[doc][msgs][1][data]}"
"actual-message" =>"%{[doc][msgs][3][data][Trace]}"
"error" =>"%{[doc][msgs][5][ex][exs][0][ec]}"
"error-type" =>"%{[doc][msgs][5][ex][exs][0][typ]}"
}
}
This approach is static as my logs is occurring dynamically i.e position of error is not fixed as it may come in 6th array element or may be at 7th or 8th,
so i ignored this approach and followed the split filter approach:-
Split Filter in logstash config:-
input{
file{
path=>"C:\Logs\GatewayService\GatewayService-Processor.Transactions-20170830.slog"
}
}
split {
field=>"msgs"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "g_index"
}
}
now it is showing error as:
[2017-09-19T17:40:07,557][WARN ][logstash.filters.split ] Only String and Array types are splittable. field:msg is of type = NilClass
so how should i able to retrieve every element in this JSON to be a field so as to visualize in kibana by applying metrics in dashboard.

Related

How to display follow-up prompts from the Language studio in the Bot Framework Composer?

I am working with the Bot Framework Composer and with the use of the Language Studio (Custom question answering). I get the answers via HTTP request, but I can't manage to display the corresponding follow up prompts. What is the best way to implement this? I have questions with one or more prompts for this.
Hee is my current implementation:
Here is the sourcecode from this dialog:
{
"$kind": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "mk52XN",
"name": "QuestionAnswerDialog",
"comment": ""
},
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"triggers": [
{
"$kind": "Microsoft.OnBeginDialog",
"$designer": {
"name": "BeginDialog",
"description": "",
"id": "yPWepT"
},
"actions": [
{
"$kind": "Microsoft.HttpRequest",
"$designer": {
"id": "xCsOHX"
},
"resultProperty": "turn.results",
"method": "POST",
"url": "<URL to the Language Studio endpoint>",
"headers": {
"Ocp-Apim-Subscription-Key": "<Subscription-Key>"
},
"contentType": "application/json",
"body": {
"question": "${turn.activity.text}",
"confidenceScoreThreshold": "0.7"
}
},
{
"$kind": "Microsoft.SetProperty",
"$designer": {
"id": "k0Q6E9"
},
"value": "${turn.results.content.answers[0].answer}",
"property": "user.answer"
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "Wz99hX"
},
"condition": "=user.answer == \"QA32202\"",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "3JwuLN"
},
"activity": "${SendActivity_3JwuLN()}"
}
],
"elseActions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "GUGtRX"
},
"activity": "${SendActivity_GUGtRX()}"
}
]
}
]
}
],
"generator": "QnA-Dialog.lg",
"recognizer": "QnA-Dialog.lu.qna",
"id": "QnA-Dialog"
}
Here is the output from my HTTP-Request:
{
“lgType”: “Activity”,
“text”: {
"statusCode": 200,
"reasonPhrase": "OK",
"headers": {
"csp-billing-usage": "CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1",
"x-envoy-upstream-service-time": "675",
"apim-request-id": "641b61f6-a55b-421b-b9c0-69fe8e17a9c7",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
"X-Content-Type-Options": "nosniff",
"Date": "Wed, 12 Oct 2022 20:19:00 GMT"
},
"content": {
"answers": [
{
"questions": [
"test2"
],
"answer": "test2",
"confidenceScore": 1.0,
"id": 38,
"source": "Editorial",
"metadata": {
"system_metadata_qna_edited_manually": "true"
},
"dialog": {
"isContextOnly": false,
"prompts": [
{
"displayOrder": 0,
"qnaId": 31,
"displayText": "Test1"
},
{
"displayOrder": 1,
"qnaId": 6,
"displayText": "Test2"
}
]
}
}
]
}
}
}
You can see here, that there are two follow-up prompts for this answer (Test1 and Test2). How can i display them inside the chat window? Thanks in advance!

Chainlink multi-variable responses - results not getting appended

I'm trying to implement a multi-variable job on my local node, however I'm finding that only 1 of the 3 results are being added to the chainlink_result_collection array in the resultcollect task. My definition is very similar to the example one linked, the main difference being the use of an external adapter
Running the above example smart contract and spec on my node works, and gives the following output. Take note of the chainlink_result_collection array being appended to after each run. Have linked the output file to stay under the 30k size limit for SO posts
However when I try to run my multi-variable job, I get the following output. Take note of the chainlink_result_collection after each resultcollect task. You can see each time it's being set to the latest return value, instead of being appended to like the previous job output. So the length of the chainlink_result_collection array at the end is 1 instead of 3 elements
{
"id": "c27b2627-3aeb-4acb-8b84-1e191854b25d",
"jobId": "332118053343434c8d519e4c3a8c3fef",
"result": {
"data": {
"result": "0x0000000000000000000000000000000000000000000000020000000000002060",
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"__chainlink_result_collection__": [
"0x0000000000000000000000000000000000000000000000020000000000002060"
]
},
"error": "insertEthTx failed while constructing EthTx data: number of collectors 2 != number of types in ABI encoding 4"
},
"status": "errored",
"taskRuns": [
{
"id": "5b7a842a-c5bb-47bb-86d6-9ffc9a8d6288",
"result": {
"data": {
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"roundAnswer": "36893488147419111519",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"laterRoundAnswer": "36893488147419111520",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"earlierRoundAnswer": "36893488147419111518"
},
"error": null
},
"status": "completed",
"task": {
"ID": 83,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "historical-price",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.169781+09:30",
"UpdatedAt": "2021-08-27T16:16:00.169781+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 3
},
{
"id": "ce1394bd-5d9e-4150-8fd2-7d251b69a81d",
"result": {
"data": {
"result": "36893488147419111519"
},
"error": null
},
"status": "completed",
"task": {
"ID": 84,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "copy",
"confirmations": null,
"params": {
"copyPath": [
"roundAnswer"
]
},
"CreatedAt": "2021-08-27T16:16:00.170343+09:30",
"UpdatedAt": "2021-08-27T16:16:00.170343+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "da32538d-b640-4bcb-8acb-fe9aafa344b0",
"result": {
"data": {
"result": "0x000000000000000000000000000000000000000000000002000000000000205f"
},
"error": null
},
"status": "completed",
"task": {
"ID": 85,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethuint256",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.170885+09:30",
"UpdatedAt": "2021-08-27T16:16:00.170885+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "372cdf12-8752-492c-9c2d-ff3354d878af",
"result": {
"data": {
"result": "0x000000000000000000000000000000000000000000000002000000000000205f",
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"__chainlink_result_collection__": [
"0x000000000000000000000000000000000000000000000002000000000000205f"
]
},
"error": null
},
"status": "completed",
"task": {
"ID": 86,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "resultcollect",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.171458+09:30",
"UpdatedAt": "2021-08-27T16:16:00.171458+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "0c8e18c2-c352-4af0-a282-a19fbcf03c2d",
"result": {
"data": {
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"roundAnswer": "36893488147419111519",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"laterRoundAnswer": "36893488147419111520",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"earlierRoundAnswer": "36893488147419111518"
},
"error": null
},
"status": "completed",
"task": {
"ID": 87,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "historical-price",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.172138+09:30",
"UpdatedAt": "2021-08-27T16:16:00.172138+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "48482e08-bed1-4956-8aa8-3ff6f2d9f38d",
"result": {
"data": {
"result": "36893488147419111518"
},
"error": null
},
"status": "completed",
"task": {
"ID": 88,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "copy",
"confirmations": null,
"params": {
"copyPath": [
"earlierRoundAnswer"
]
},
"CreatedAt": "2021-08-27T16:16:00.172638+09:30",
"UpdatedAt": "2021-08-27T16:16:00.172638+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "825ed16c-b662-4fb2-ac2d-abeee3259cfc",
"result": {
"data": {
"result": "0x000000000000000000000000000000000000000000000002000000000000205e"
},
"error": null
},
"status": "completed",
"task": {
"ID": 89,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethuint256",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.173151+09:30",
"UpdatedAt": "2021-08-27T16:16:00.173151+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "58ade305-bc91-4542-83b5-8b4e0018eebf",
"result": {
"data": {
"result": "0x000000000000000000000000000000000000000000000002000000000000205e",
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"__chainlink_result_collection__": [
"0x000000000000000000000000000000000000000000000002000000000000205e"
]
},
"error": null
},
"status": "completed",
"task": {
"ID": 90,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "resultcollect",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.173677+09:30",
"UpdatedAt": "2021-08-27T16:16:00.173677+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "d7982f84-03be-4f41-a6ad-ee487c84fc6b",
"result": {
"data": {
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"roundAnswer": "36893488147419111519",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"laterRoundAnswer": "36893488147419111520",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"earlierRoundAnswer": "36893488147419111518"
},
"error": null
},
"status": "completed",
"task": {
"ID": 91,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "historical-price",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.174159+09:30",
"UpdatedAt": "2021-08-27T16:16:00.174159+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "cf3a1caa-723e-4b2f-ae50-6096007dd02e",
"result": {
"data": {
"result": "36893488147419111520"
},
"error": null
},
"status": "completed",
"task": {
"ID": 92,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "copy",
"confirmations": null,
"params": {
"copyPath": [
"laterRoundAnswer"
]
},
"CreatedAt": "2021-08-27T16:16:00.174617+09:30",
"UpdatedAt": "2021-08-27T16:16:00.174617+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "53d76d5c-01b2-4e0d-8515-9f1a4901635b",
"result": {
"data": {
"result": "0x0000000000000000000000000000000000000000000000020000000000002060"
},
"error": null
},
"status": "completed",
"task": {
"ID": 93,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethuint256",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.175071+09:30",
"UpdatedAt": "2021-08-27T16:16:00.175071+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "1fb908bb-9539-4617-9395-4e5796e214c2",
"result": {
"data": {
"result": "0x0000000000000000000000000000000000000000000000020000000000002060",
"address": "0xb6EFEcE462EA6118A0A7EC1F2a3c7033b1F82967",
"dataPrefix": "0xc23231a259fa1d606b3b1f8d31d6b169af467af60dbf0ac4e0014eb49553ccc70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f08086217d2ab6f717fd7a12cd3c53a94efa6761b2cdfe81000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061288b88",
"unixDateTime": "1625097600",
"functionSelector": "0x4ab0d190",
"aggregatorAddress": "0x9326BFA02ADD2366b30bacB125260Af641031331",
"__chainlink_result_collection__": [
"0x0000000000000000000000000000000000000000000000020000000000002060"
]
},
"error": null
},
"status": "completed",
"task": {
"ID": 94,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "resultcollect",
"confirmations": null,
"params": {
},
"CreatedAt": "2021-08-27T16:16:00.175515+09:30",
"UpdatedAt": "2021-08-27T16:16:00.175515+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
},
{
"id": "8763850e-80a6-4a1b-af04-aabfb69ff2c9",
"result": {
"data": {
},
"error": "insertEthTx failed while constructing EthTx data: number of collectors 2 != number of types in ABI encoding 4"
},
"status": "errored",
"task": {
"ID": 95,
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethtx",
"confirmations": 1,
"params": {
"abiEncoding": [
"bytes32",
"uint80",
"uint80",
"uint80"
]
},
"CreatedAt": "2021-08-27T16:16:00.175982+09:30",
"UpdatedAt": "2021-08-27T16:16:00.175982+09:30",
"DeletedAt": null
},
"minimumConfirmations": 3,
"confirmations": 1
}
],
"createdAt": "2021-08-27T16:16:52.308136+09:30",
"finishedAt": "2021-08-27T16:18:59.22246+09:30",
"updatedAt": "2021-08-27T16:18:59.259186+09:30",
"creationHeight": "26956178",
"observedHeight": "26956180",
"payment": "0",
"initiator": {
"id": 7,
"jobSpecId": "33211805-3343-434c-8d51-9e4c3a8c3fef",
"type": "runlog",
"params": {
"address": "0xb6efece462ea6118a0a7ec1f2a3c7033b1f82967"
}
},
"type": "Direct request job run"
}
This is my job definition:
{
"name": "multi-word2",
"initiators": [
{
"id": 7,
"jobSpecId": "33211805-3343-434c-8d51-9e4c3a8c3fef",
"type": "runlog",
"params": {
"address": "0xb6efece462ea6118a0a7ec1f2a3c7033b1f82967"
}
}
],
"tasks": [
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "historical-price"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "copy",
"params": {
"copyPath": [
"roundAnswer"
]
}
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethuint256"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "resultcollect"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "historical-price"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "copy",
"params": {
"copyPath": [
"earlierRoundAnswer"
]
}
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethuint256"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "resultcollect"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "historical-price"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "copy",
"params": {
"copyPath": [
"laterRoundAnswer"
]
}
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethuint256"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "resultcollect"
},
{
"jobSpecId": "332118053343434c8d519e4c3a8c3fef",
"type": "ethtx",
"confirmations": 1,
"params": {
"abiEncoding": [
"bytes32",
"uint80",
"uint80",
"uint80"
]
}
}
]
}
the issue is that the 'chainlink_result_collection' array is not passed through from the resultsCollect to the EA (external adapter) call, whereas it is from resultsCollect to a normal HTTP Get task. I verified this by creating a job that contains 3 requests (EA, HTTPGET, EA), and observed that at the resultsCollect for the HTTPGet, the array correctly had 2 values, however on the final request (EA), the array didn't get passed through to the EA task, and the end result was just the 1 return value from the final EA
There's an open issue on this at the Chainlink GitHub

Firebase: JSON payload not accepted

I'm trying to push JSON from a service in to Firebase, and it's not accepting it.
I cant figure out why. JSONLint validates it as valid.
The error I get is:
error: "Invalid data; couldn't parse JSON object, array, or value."
Here's the JSON payload:
{
"app_id": "e4805b8d5a9f4032b0bb8b6d9c6726b8",
"archived": false,
"attachments": {
"form.xml": {
"content_type": "text/xml",
"length": 4500,
"url": "https://someurl.com/form.xml"
}
},
"build_id": "3c5703e20346462ebcb07a3f36d5fe9b",
"domain": "my-test",
"edited_by_user_id": null,
"edited_on": null,
"form": {
"#type": "data",
"#name": "Beneficiary Registration",
"#uiVersion": "1",
"#version": "1",
"#xmlns": "http://openrosa.org/formdesigner/123456",
"beneficiary_age": {
"beneficiary_age_num": "8",
"beneficiary_exact_age_ind": "N"
},
"beneficiary_gender_cd": "M",
"beneficiary_id": "Hhr-O6I3C5L-J3G1L",
"case": {
"#case_id": "a07972bc-1a34-4c84-90ea-91250639f2a4",
"#date_modified": "2020-03-17T20:57:26.986000Z",
"#user_id": "2275c340c48ac83b6852035b0a15b5d3",
"#xmlns": "http://someurl.org/case/transaction/v2"
},
"case_name": "Hhr-O6I3C5L-J3G1L|joel galager|Katsekera|Katsekera|Mpando|Katsekera|KE",
"existing_beneficiaries": "Jane Doe\n\nJoan Doe",
"existing_beneficiaries_label": "",
"household_information": {
"beneficiary_household_information_display": "",
"beneficiary_location_hierarchy_1": "KE",
"beneficiary_location_hierarchy_1_text": "Kenya",
"beneficiary_location_hierarchy_2": "HF0001",
"beneficiary_location_hierarchy_2_text": "Katsekera",
"beneficiary_location_hierarchy_3": "TA0001",
"beneficiary_location_hierarchy_3_text": "Mpando",
"beneficiary_location_hierarchy_4": "GHV0001",
"beneficiary_location_hierarchy_4_text": "Katsekera",
"beneficiary_location_hierarchy_5": "V0001",
"beneficiary_location_hierarchy_5_text": "Katsekera",
"correct_information": "",
"hh_first_name": "John",
"hh_full_name": "John Doe",
"hh_id_fk": "Hhr-O6I3C5L",
"hh_last_name": "Doe",
"household_information": ""
},
"meta": {
"#xmlns": "http://openrosa.org/jr/xforms",
"appVersion": "Formplayer Version: 2.47",
"app_build_version": 1,
"commcare_version": null,
"deviceID": "Formplayer",
"drift": "0",
"geo_point": null,
"instanceID": "123-321-232",
"timeEnd": "2020-03-17T20:57:26.986000Z",
"timeStart": "2020-03-17T20:57:13.958000Z",
"userID": "2275c340c48ac83b6852035b0a15b5d3",
"username": "some_username"
},
"name_group": {
"beneficiary_first_name": "joel",
"beneficiary_full_name": "joel galager",
"beneficiary_last_name": "galager"
},
"subcase_0": {
"case": {
"#case_id": "2a4bfe27-a5c3-4f3a-8540-5f8ded86db85",
"#date_modified": "2020-03-17T20:57:26.986000Z",
"#user_id": "abc123",
"#xmlns": "http://commcarehq.org/case/transaction/v2",
"create": {
"case_name": "Hhr-O6I3C5L-J3G1L|joel galager|Katsekera|Katsekera|Mpando|Katsekera|KE",
"case_type": "beneficiary_case",
"owner_id": "abc123"
},
"index": {
"parent": {
"#text": "a07972bc-1a34-4c84-90ea-91250639f2a4",
"#case_type": "household_case"
}
},
"update": {
"beneficiary_age_num": "8",
"beneficiary_exact_age_ind": "N",
"beneficiary_first_name": "joel",
"beneficiary_full_name": "joel galager",
"beneficiary_gender_cd": "M",
"beneficiary_id": "Hhr-O6I3C5L-J3G1L",
"beneficiary_last_name": "galager",
"beneficiary_location_hierarchy_1": "KE",
"beneficiary_location_hierarchy_1_text": "Kenya",
"beneficiary_location_hierarchy_2": "HF0001",
"beneficiary_location_hierarchy_2_text": "Katsekera",
"beneficiary_location_hierarchy_3": "TA0001",
"beneficiary_location_hierarchy_3_text": "Mpando",
"beneficiary_location_hierarchy_4": "GHV0001",
"beneficiary_location_hierarchy_4_text": "Katsekera",
"beneficiary_location_hierarchy_5": "V0001",
"beneficiary_location_hierarchy_5_text": "Katsekera",
"hh_id_fk": "Hhr-O6I3C5L"
}
}
}
},
"id": "d547ccea-503c-4c50-b974-38ed564ae78a",
"indexed_on": "2020-03-17T21:01:04.695654",
"initial_processing_complete": true,
"is_phone_submission": true,
"metadata": {
"appVersion": "Formplayer Version: 2.47",
"app_build_version": 1,
"commcare_version": null,
"deviceID": "Formplayer",
"drift": "0",
"geo_point": null,
"instanceID": "01010101",
"location": null,
"timeEnd": "2020-03-17T20:57:26.986000Z",
"timeStart": "2020-03-17T20:57:13.958000Z",
"userID": "2275c340c48ac83b6852035b0a15b5d3",
"username": "myusername"
},
"problem": null,
"received_on": "2020-03-17T20:57:27.179986Z",
"resource_uri": "",
"server_modified_on": "2020-03-17T20:57:27.382548Z",
"type": "data",
"uiversion": "1",
"version": "1"
}
This is probably because of #type inside form.
The # character can't be used in RTDB paths.
See How data is structured from the docs.
Keys cannot contain
.
$
#
[
]
/
ASCII control characters 0-31 or 127

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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dAe8bquTT9YAmAroAp3_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.eyJhdWQiOiJodHRwczovL2FwaS5hbWF6b25hbGV4YS5jb20iLCJpc3MiOiJBbGV4YVNraWxsS2l0Iiwic3ViIjoiYW16bjEuYXNrLnNraWxsLmJmYjgxYWM1LWQ0NjMtNDIwMS1iNzBjLWEzNWY4Y2M2ZGJlZCIsImV4cCI6MTU3OTY4NTExMiwiaWF0IjoxNTc5Njg0ODEyLCJuYmYiOjE1Nzk2ODQ4MTIsInByaXZhdGVDbGFpbXMiOnsiY29udGV4dCI6IkFBQUFBQUFBQUFCYkQrVWhLb1dHaUhOOFVsMDhLelhES3dFQUFBQUFBQUFQdkZkcVU4RzczM2QrcU9UZ0I1U1ViMUlBSkwrZFdQTTJnelBZK1V3WE96K3A0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DSk1HT01LNFZYTk9OWEdHSUNZS0JCSUU3TE1DVFNVT1ZFWVJBUzNFMkFUTlEifX0.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"
}
}

Returning metadata value from JSON API Response

I have an api request that returns JSON data which is then used to populate an html table. I am able to populate the table with item.name ... I would like to add the metadata value for player.field but I have not been able to access it. Here is the JSON response:
{
"list": [
{
"id": 55,
"name": "0046GS (RMS03241708)",
"description": "S 12-7 M-S 10-9",
"uuid": "6f4b5bfd-6d17-4095-9e48-7b9313f7f8c6",
"previewPlayer": false,
"enabled": true,
"mac": "00-00-00-00-00-00",
"type": "CHROMEBOX",
"distributionServer": {
"id": 2,
"name": "Main",
"driver": "IP_P2P"
},
"playergroups": [
{
"id": 2,
"name": "GameStop",
"numberOfPlayers": 454
}
],
"playerDisplays": [
{
"id": 55,
"name": "Display 1",
"channel": {
"id": 53,
"name": "GameStop TV"
},
"screenCounter": 1
}
],
"requestLogs": false,
"downloadThreads": 1,
"unusedFilesCache": 24,
"planDeliveryMethod": "CONTENT_MANAGER_DIRECT",
"pollingInterval": 1,
"pollingUnit": "MINUTES",
"logLevel": "normal",
"metadataValue": [
{
"id": 12512,
"value": "true",
"playerMetadata": {
"id": 34,
"name": "Player.field",
"datatype": "BOOLEAN",
"valueType": "ANY",
"order": 4
}
},
{
"id": 1085,
"value": "77056",
"playerMetadata": {
"id": 31,
"name": "Player.ZipCode",
"datatype": "STRING",
"valueType": "ANY",
"order": 30
}
},
{
"id": 1071,
"value": "22:15",
"playerMetadata": {
"id": 10,
"name": "Player.ScreenOff_Wednesday",
"datatype": "STRING",
"valueType": "ANY",
"order": 12
}
}
],
"usedPairingKey": "HBVULW",
"active": "ACTIVE",
"lastModified": "2017-04-03 20:12:43",
"timezoneOffset": "0"
}
],
"offset": 0,
"count": 68
}
Here is the ajax request:
$.ajax({
type: 'GET',
url: "https://sampleserver.com:8080/ContentManager/api/rest/players?limit=1&offset=0&sort=name&filters=%7BplayerStatus%20:%20%7Bvalues:%5B'ACTIVE'%5D,%20comparator%20:%20'eq'%7D%7D",
dataType: "json",
success: function(data) {
$.each(data.list, function(i, item) {
var tr = $('<tr><td>'+item.name+'</td><td>'+some.JSONResponse+'</td></tr>').appendTo('#scalaapi');
});
}
});
I am stuck on how to specifically display the value for player.field ... "value": "true",
It feels like it should be simple, but my attempts have all been met with undefined.
Attempted if statement...
success: function(data) {
$.each(data.list, function(i, item) {
var tr = $('<tr><td>'+item.name+'</td><td class="val">...</td></tr>').appendTo('#scalaapi');
var bool = function(i,item) {if (item.metadataValue.id = '12512');
tr.find('.val').text(bool);};
});
}
});