2
I own a String
as follows:
[["155","123RET"],["156","124RET"]]
In other words, in it two subArrays
that I need to add an item still in each one, my need is that in the end these arrays stay as follows:
[["1","155","123RET"],["2","156","124RET"]]
I need to convert this string
original in a array
so I can alter them according to my need.
I tried it this way:
def array = Eval.me(suprimentoRetEstoque)
And my return was like this:
[[155, 123RET],[156, 124RET]]
However I am not getting through these subArrays, there is some way to convert a string in array other than that Eval.me()
?
How I can precorrer this generated array?
– R.Santos
From what it says in the documentation (http://grails.asia/groovy-list-tutorial-and-examples), this object is a
ArrayList
of Java, I believe aforEach
resolves.– Lucas Henrique
Is that my need is just that, if you can post an answer with that I thank you ;)
– R.Santos
I edited, see if it answers your doubt (I am without compiler, any error that gives can report me)
– Lucas Henrique
Forget Lucas I figured out how to do, I’ll post a reply showing how my code turned out at the end, thanks for the help :)
– R.Santos