Locator not being read correctly when trying to verify API response

Good Morning,

I am currently trying to validate and API response and am running into an issue validating the property value.

The API response i am getting is as follows
“11867”:“CPPHL Daily Transactions- Equity”

When i press CTRL + K to get the validation the statement reads as follows

WS.verifyElementPropertyValue(response, 'jobsList.11867', "CPPHL Daily Transactions- Equity")

When I try to run this validation in my test case I am getting the following error.

 Unable to verify element property value (Root cause: 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unexpected token: 11867 @ line 1, column 102.
sonText);return root.jobsList.11867;

Any idea why this would be the recommended locator, but then throw an error? Could I possibly just be missing something simple?

The code in my test is below

Hi @TDube,
This issue is caused by using number as the JSON field name. One workaround is surrounding your number field name with double quotes. That means:
WS.verifyElementPropertyValue(response, ‘jobsList."11867"’, “CPPHL Daily Transactions- Equity”)

That worked.