BoxLang ArrayFind and ArrayContains

I am not seeing that. Checking the output of the second file you sent me, I see:

{
  selected : true,
  selectedProviderIDs : [
      1
  ],
  currentID : 1
}
{
  selected : false,
  selectedProviderIDs : [
      1
  ],
  currentID : 2
}
{
  selected : true,
  selectedProviderIDs : [
      1
  ],
  currentID : 1
}
{
  selected : false,
  selectedProviderIDs : [
      1
  ],
  currentID : 2
}

Dang it, hit submit too quickly. The results from the first part of the test are -

true, false

Then:

true, false

To make it easier to read, I added firstLoop:true to the first dump, and secondLoop:true to the second. I get this:

{
  selected : true,
  selectedProviderIDs : [
      1
  ],
  currentID : 1,
  firstLoop : true
}
{
  selected : false,
  selectedProviderIDs : [
      1
  ],
  currentID : 2,
  firstLoop : true
}
{
  secondLoop : true,
  selected : true,
  selectedProviderIDs : [
      1
  ],
  currentID : 1
}
{
  secondLoop : true,
  selected : false,
  selectedProviderIDs : [
      1
  ],
  currentID : 2
}

Hmmm, I “think” I’m running latest version BoxLang. Maybe not??

This is what boxlang --version says for me: Ortus BoxLang™ v1.0.0-snapshot+3211

Ray, thank you very much for the help. I finally wiped everything under boxHome in commandbox folder and started fresh and now it works. Not sure what could possibly be different than prior but if it works it works! Thank you again!

My pleasure, and like I said, I think it exposed an issue with output order. (I’ve filed that.)