Home:ALL Converter>Uncaught SyntaxError: Unexpected token -

Uncaught SyntaxError: Unexpected token -

Ask Time:2019-02-18T03:13:43         Author:rob.m

Json Formatter

I use

let op = data.map(({usp-custom-90})=> usp-custom-90 )

but that gives

Uncaught SyntaxError: Unexpected token -

I tried to replace dash with – but then I get errors in regards of &

How do I fix it?

Author:rob.m,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54736704/uncaught-syntaxerror-unexpected-token
Paul :

Identifiers cannot contain hyphens, so you must rename the property to a valid identifier name:\n\nlet op = data.map( ({ ['usp-custom-90']: uspCustom90 }) => uspCustom90 )\n",
2019-02-17T19:19:13
yy