Unfortunately, I am completely stumped when it comes to Javascript. I'm attempting a few solutions based on online resources. If anyone could offer some assistance, that would be greatly appreciated.
Below is the JSON data provided. It has been condensed to just three items, but in actuality, it could contain up to 50 items. My goal is to extract either the id 7514 if the customFieldId is 3 or the id 3854 if the customFieldId is 1.
{
"items": [
{
"id": 3854,
"customFieldId": 1,
"customField": {
"links": [
{
"rel": "canonical",
"href": "https://stgxilinx.learn.taleo.net/learn.rest/v1/learnCenters/178410/userCustomFields/1"
}
]
},
"value": "Yes",
"links": [
{
"rel": "canonical",
"href": "https://stgxilinx.learn.taleo.net/learn.rest/v1/memberships/3487/customFieldValues/3854"
}
]
},
{
"id": 7514,
"customFieldId": 3,
"customField": {
"links": [
{
"rel": "canonical",
"href": "https://stgxilinx.learn.taleo.net/learn.rest/v1/learnCenters/178410/userCustomFields/3"
}
]
},
"value": "No",
"links": [
{
"rel": "canonical",
"href": "https://stgxilinx.learn.taleo.net/learn.rest/v1/memberships/3487/customFieldValues/7514"
}
]
},
{
"id": 93432,
"customFieldId": 10,
"customField": {
"links": [
{
"rel": "canonical",
"href": "https://stgxilinx.learn.taleo.net/learn.rest/v1/learnCenters/178410/userCustomFields/10"
}
]
},
"value": "Fulltime-Regular",
"links": [
{
"rel": "canonical",
"href": "https://stgxilinx.learn.taleo.net/learn.rest/v1/memberships/3487/customFieldValues/93432"
}
]
}
]
}