function that extract data using path from json
delete debugging