Need help solving this

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.

Skills: JavaScript

About the Client:
( 5 reviews ) BATON ROUGE, United States

Project ID: #33771498

53 freelancers are bidding on average $23 for this job

(439 Reviews)

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

$30 USD in 1 day
(97 Reviews)
(75 Reviews)

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

$40 USD in 1 day
(133 Reviews)
(69 Reviews)
(97 Reviews)

Hi I have checked your project description. I have excellent programming and development skills. Contact me with all the details and requirements for your project for further discussion. I will provide you with dedica More

$30 USD in 1 day
(49 Reviews)

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

$30 USD in 1 day
(49 Reviews)

Dear sir, I have gone through your outsourced requirement " Need help solving this " and have analyzed that I have right credentials ( JavaScript ) to execute your esteemed project. You will never go wrong choosing me More

$20 USD in 7 days
(19 Reviews)

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

$10 USD in 1 day
(18 Reviews)

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

$30 USD in 1 day
(8 Reviews)

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

$21 USD in 1 day
(11 Reviews)

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

$20 USD in 1 day
(23 Reviews)

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

$20 USD in 7 days
(21 Reviews)

Hi sir. Thanks for your posting. Javascript is OK for me. Please visit my profile. Please feel free to contact me. Best regards!

$30 USD in 1 day
(2 Reviews)

Hi.I am interesting about your project. I am good fit for your requirements and my major skill is same as your requirements. I have 10+ years of experience in software industry. With my support, you can finish your More

$50 USD in 7 days
(7 Reviews)

⭐Hello!⭐ Careful reading the description and I'm confident I can implement your project successfully in time. I have done a lot of similar tasks. If you hire me, I will do my best for you to complete with better qualif More

$20 USD in 1 day
(4 Reviews)

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

$20 USD in 7 days
(2 Reviews)

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

$20 USD in 1 day
(3 Reviews)

Piece of cake. I can send you a tested function in just an hour. I'm great at algorithmic problem solving (especially via JS).

$15 USD in 1 day
(7 Reviews)