Javascript API based in extract and POST in json