loop conditional activity -> json