Fix how the array of models is iterated

/to @bajtos 
/cc @dashby3000 

Fixes https://github.com/strongloop/loopback-explorer/issues/49