Tuesday, 2 January 2018

How can I use an IF statement when comparing to a JSON Array?

Hello, I want to know how I could compare something to everything within a JSON array. I don't know the proper term for this so if you could add it to your answer that would be great =) But here is what I am trying to do.JSON File{ "ID": ["001", "002", "003"] } Node.JSx = "001"; if( x == ID){ console.log("True") } else{ console.log("False") }

Submitted January 02, 2018 at 07:20PM by nightfuryninja1

No comments:

Post a Comment