JavaScript Array Expert

Cerrado Publicado hace 3 años Pagado a la entrega
Cerrado Pagado a la entrega

I have an array and i want to filter this array by Country and Service

i did the filter by Country but i want also do the same thing by service

this the array :

[

{

"Country":"CHINA",

"details":"V2020",

"Service":"BUSINESS",

},

{

"Country":"CHINA",

"details":"V3030",

"Service":"BUSINESS",

},

{

"Country":"USA",

"details":"Bus-Trip",

"Service":"BUSINESS",

},

{

"Country":"USA",

"details":"Comm-Trip",

"Service":"COMMUNICATION",

},

];

I was able to do that by this code

let objectData = [login to view URL](function (acc,cur) {

if (!acc[[login to view URL]])

acc[[login to view URL]] = { data : []};

acc[[login to view URL]].[login to view URL](cur)

return acc;

},

{} );

the code above allowed me to filter only by country and it's work but i want to do this same thing by country and service BOTH and i want the result like this :

[

{

Country :"CHINA",

Services : [

{"name":"BUSINESS", data : [{"details":"V2020"},{"details":"V3030"}]},

]

},

{

Country :"USA" ,

Services : [

{"name":"BUSINESS", data : [{"details":"Bus-Trip20"}]},

{"name":"COMMUNICATION", data : [{"details":"Comm-Trip30"}]},

]

},

]

JavaScript Java Arquitectura de software PHP Python

Nº del proyecto: #27109132

Sobre el proyecto

12 propuestas Proyecto remoto Activo hace 3 años

12 freelancers están ofertando un promedio de $49 por este trabajo

MimiFL

Hi, the code is little bit more complicated then the original one, but this is definitely possible. If you like, you can message me and i will explain step by step and it will produce the same result as in your descrip Más

$15 USD en 1 día
(312 comentarios)
6.7
dyadkovdev

Hello sir, Greeting. I am a Python Expert with career for 6 years over. I am very happy to bid on your job. I have rich experience in web Backend development with python Django REST, Django Flask Frameworks. Also, Más

$50 USD en 1 día
(11 comentarios)
5.6
hassansystem

JavaScript EXPERT here I can help you with Java Script Arrays I have 8+ years of experience in Web Designing and Development. Let have a chat and discuss in detail I have read your description. Once we clear our r Más

$20 USD en 7 días
(19 comentarios)
4.7
Petrov4work

Hello, Javascript Expert here. my all works are related in javascript, as web developer, almost developers work with javascript, it is obiously right, because it's versy basic skill. Pls send me offer. Thanks, Anton

$350 USD en 7 días
(7 comentarios)
4.1
yurijklimov98

Hello Potential Client. I am professional software developer with 10 years experiences of Javascript and Python. I have developed many Project. I can start working right now and can do it successfully. I’m waiting for Más

$20 USD en 1 día
(10 comentarios)
4.0
odonyemisco

Hello, I can help with your javascript filter. you can send me a chat to discuss more about it, and I will fix it right away. thanks.

$15 USD en 1 día
(17 comentarios)
3.6
ahmedabdo1995

iam experienced with javascript and can help you with this array right now and will send you the working code for what you asked for

$20 USD en 1 día
(7 comentarios)
2.5
rajamyaqoob

Hello, I hope you are doing well, I have 3+ years of experience in Web Designing and Developing using Javascript, PHP &Jquery. Let have a chat and discuss in project in detail. I have already read your description. On Más

$20 USD en 7 días
(1 comentario)
1.2