所以我有一个包含多个对象的文件,如下所示:
{
"order":{
"identifier":"B409908375",
"timeCreated":"2018-11-17T18:27:14.423335",
"totalPrice":10.000000000000000000000000000,
"payer_identity":{
"identifier":"K396677386",
"firstName":"Erika",
"lastName":"Mustermann",
"email":"testbuyer@mail.com",
"isEmailVerified":true,
"countryCode3Letter":"DEU"
},
"paymentProviderId":1,
"runtimeLengthDays":-1,
"runtimeOptionCustomIdentifier":"7fbdc628-893c-4499-844c-7a8c7ecaf325",
"productSku":"nd79z8jinqmkmtewfrb5"
},
"license":{
"productSku":"nd79z8jinqmkmtewfrb5",
"issuedToIdentifier":"K396677386",
"validFrom":"2018-11-17T18:27:21.21126",
"validUntil":"9999-01-01T00:00:00",
"isPermanent":true,
"keyIdentifier":"6b3d646f-cb20-4fc5-b520-e53227379407",
"isActive":true
}
}
I am trying to do a license check, so look for the keyIdentifier
and see if it matches an input through a form. The input returns {license: "input"}
and the result returns {order: {…}, license: {…}}
. So yeah I want to check if input value can be found in the result/object.