The second argument to foreach is not a list

your data seems to be in json, better parse it into list then try

you can use default web block or can use this extension [Free] Json To Dictionary Extension