Map an object key that matches or ends with a value in Node.js