Json question help

I have this code:

but is shows the "," after the last name, what is the best way to remove this?

the json is:

I don't know exactly how to solve this in a Web Source.
The solution would be to check if the last row in the foreach-loop is reached.
Only add the ", " if this is NOT the last iteration/row in this loop.

Yes but how? maybe the code is better in other way?

You could achieve this by

ifoutput "composer"
say ", "
ifnot "0"
json_select "names"
json_select "en"
In general, if there was a command to bring the content of a buffer to the "current" one, that would solve many similar issues.
E.g. here, "currentbuffer" is the input buffer populated from WS when consuming the input stream (json or text). "Composer" has a trailing comma.
set "currentbuffer"
outputto "currentbuffer"
sayoutput "composer"
set "composer"
regexpreplace "[,\s]+$" ""
gotochar 1
We bring buffer "composer" to the input buffer, we process it there and then move it back (Say command).
I had raised similar issue several years back.
Because of this "missing" functionality I had stopped some heavy WS developments had spent endless days.
Only @Florian could help in this case, if he can anyway.

i cannot get this solution to work, can you give me an hint?

Can you please share your discogs release id?

do you mean the album example in the first post?: 893369

What I wrote initially should work (if collected tag is not empty then add separator to it).
I would like to know the exact source and id you use for your example.
It is not Discogs. Discogs do don't use tag "composers" AFAIK.

The source i use is http://vgmdb.info/


In Json: http://vgmdb.info/album/73784?format=json

the websource:

VGMdb#Search by &Album JSON.src (4.8 KB)

Use this section for "composers"
You may need to do the same for all multivalue tags.
The key is ifoutput "composer" ... say ", " ... endif.

# Composers
outputto "composer"
json_foreach "composers"
	ifoutput "composer"
		say ", "
	json_select "names"
	json_select "en"