Need help solving this
Budget $10-30 USD
We want you to write a function, organizeItems, that organizes items by category. The argument to the function is an array of item objects. Each item object has 3 properties, category (string), itemName (string), and onSale (Boolean).
Here's an example:
var itemData = [
{ category: 'fruit', itemName: 'apple', onSale: false },
{ category: 'canned', itemName: 'beans', onSale: false },
{ category: 'canned', itemName: 'corn', onSale: true },
{ category: 'frozen', itemName: 'pizza', onSale: false },
{ category: 'fruit', itemName: 'melon', onSale: true },
{ category: 'canned', itemName: 'soup', onSale: false },
];
The return value should be an object with category properties. Each property value is an array of items that belong to that category.
Here's an example return object based on our example input:
{
fruit: ['apple', 'melon($)'],
canned: ['beans', 'corn($)', 'soup'],
frozen: ['pizza']
};
Note that items having onSale set to true should have '($)' appended to their item name.
Please complete the function organizeItems and validate it is working by running the [login to view URL] function should work for any similarly formatted input data, not just the example data we've provided.
53 freelancers are bidding on average $23 for this job
Hello i am expert in jquery i am able to do this work you will satisfy with my work i can do this work asap this simple work for me thank you
hello , hope you are fine i have very good grip in javascript i can create function like this for you , lets discuss that is my portfolio you can check https://www.freelancer.com/u/samair0
Hello, I can write this function that organise item by categories. I will finish in 1-2 hours. Kindly contact me so that we can discuss more on the specifics. Thank you
Hi! I can write this function for you in JavaScript that works in all cases with this format. I'm very familiar with JavaScript and I'm sure I can deliver this for you. I have more than 6 YEARS of experience as a dev More
Get Completion within 1 HOUR ! Hello, please hire me to complete this task in ALMOST NO TIME. You will get function within 1 hr once you hire me. Thanks, regards
I want to help with given job, have 5+ years of experience with js functions. Ready to proceed once given confirmation for the same. Regards, Krunal Raval
Hello there, I would like to help you write a function. I have experience of 5 + Years in JavaScript,PHP, Laravel, CodeIgniter, and MySQL development. I am relating to what you need. If you’d like, you can message me, More
Xin chào I can do "write a function, organizeItems" job as listed and deliver this in next 1-2 hours at max. I am ready to start right away. Please check my profile for work and experience. Regards Hung
Hi sir. Thanks for your posting. Javascript is OK for me. Please visit my profile. Please feel free to contact me. Best regards!
Hello! First receive warm greetings and hoping you are good. I welcome you to the home of Amazing services and quality. I have carefully gone through your project. I'M AN EXPERT IN NAMED SKILLS, OVER 10 YEARS OF EXPER More
Hello. Your idea is very nice. Your project encourages me to help you with perfect result. I developed Javascript for long time, so your plan is just familiar with me. The main point is your decision to award me for yo More
Piece of cake. I can send you a tested function in just an hour. I'm great at algorithmic problem solving (especially via JS).