0

I have two lists, runtime_data & cross_data in javascript.

if(runtime_data.tuples.length !== cross_data.tuples.length) {
    alert ("hello");
} else{
    alert("equal");
}

I am able to check the length of both tuples. Is there any way to compare all the values of both tuples? (are they equal or unequal)

if(runtime_data.tuples.value!== cross_data.tuples.value){
    alert ("hello");
}
else{
    alert("equal");
}

Will the above syntax work in JavaScript?

KarelG
  • 5,176
  • 4
  • 33
  • 49
  • 1
    well.., what happens when you try running that? – Rhumborl May 18 '16 at 15:39
  • Well, what is "tuples"? (tuples are not a native JS construct, so you'll have to show how you're implementing them). I'm going to guess it's an array, but an array of what? And, yes, the easiest way to determine if a given bit of code will work is to try it :) – Michael L. May 18 '16 at 15:42
  • Check out this answer for comparing arrays of objects http://stackoverflow.com/questions/27030/comparing-arrays-of-objects-in-javascript – IrkenInvader May 18 '16 at 15:44

0 Answers0