read JSON data via stdin and return a given attribute