I have a special symbol in function

I use a name “contact-name” in const. But it seems that like function “subtraction”, not name
How could I declare this?

const text = items[0].json.contact-name;
var length = text.split(' ').length;
var Name = text.split(' ')[length - 1];
return [
  {
    json: { textSplited: Name } 
  }
]

You would do this:

const text = items[0].json["contact-name"];
1 Like

Thank you, it’s done simply!