function _quotedText(data, config) {
var pathKeys=config.customKey;
console.log(pathKeys); //prints os_platform
var inAuth_data=(JSON.parse(JSON.parse(JSON.parse(data["event.fields.custom_fields.inauth_device_data"])), (key, value) => {
if (key == pathKeys)
{
console.log(value); //prints Android
return value; //returns undefined
}
}));
console.log(inAuth_data); //prints undefined
return inAuth_data; //returns undefined
}
I have encountered a similar issue before and attempted various solutions suggested by others but I am still facing the problem. Why does the function return 'undefined'?
The JSON data causing the trouble is as follows:
"\"{\\\"deviceInfo\\\":{\\\"permanentId\\\":\\\"23434433-3333-4444-9581-f9cb641d28f5\\\",\\\"publicSigningKey\\\":\\\"MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAzMRW6jXVgqX0QV0EA9h2XnnPvntER5yqPKvD+yLKtxXzBCYMzygEM1nlwBRZhVpNJFvzZ2X+oTLGasdbasjhddasdu0PAWIc1AqKMt6rDEJv4a8bgqqAnXXnvR/QjwtsIq3T59LqivcoB2IPGq7Mof7yRJXKtrEOK2a1b8ixWJ5MBZ06drONhMkzeDTKjenMSM0Hf3BFTlXKCF...