I have the array like this:
} [\"items\":\"Jcart\":private]=> array(3) { [0]=> string(1) \"3\" [1]=> string(1) \"2\"
I assume you got this by casting an object to an array. If that's the case, you shouldn't be doing that! The property is private because you're not supposed to access it directly because it's not a public API. The object should have a public method which you're supposed to call instead, that's the public API. Something like $foo->getItems()
or such. Read the documentation and/or source code.