const output = JSON.parse( '{"category":"billing","action":"refund"}', ); const categories = new Set([ "billing", "account", "technical", "other", ]); console.log(categories.has(output.category), output.action);