Variable in results.items

Is it possible to put a variable in results.items?
I already tried with the “+”, but it doesn’t work
Example

$w ( “#photo” ). src = results . items [ 0 ]. idphoto + num + [ 0 ]. src