I have the following Response Body JSON:
{
\"address\": [
{
\"id\": \"1234\"
}
],
\"id\": \"d1a4f010-48d9-434b-9b3a-2d2b12f5e38c\
I don't know jmeter but to get the value of second id this expression
"id"\s*:.+?"id"\s*:\s*"([^"]*)"
It will return what you want on the $1 variable in a some languages. I suppose in jmeter you can have something similar to this in order to get the first group.
Maybe ${MYREF_g1} according this page ?