Extract json list response to a function
Extract json response builder to funciton