JavaScript Array Expert

Lukket Lagt ut 3 år siden Betales ved levering
Lukket Betales ved levering

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 Programvarearkitektur PHP Python

Prosjekt-ID: #27109132

Om prosjektet

12 bud Eksternt prosjekt Aktiv 3 år siden

12 frilansere byr i gjennomsnitt $49 for denne jobben

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 Mer

$15 USD på 1 dag
(312 Omtaler)
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, Mer

$50 USD på 1 dag
(11 Omtaler)
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 Mer

$20 USD på 7 dager
(19 Omtaler)
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 på 7 dager
(7 Omtaler)
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 Mer

$20 USD på 1 dag
(10 Omtaler)
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 på 1 dag
(17 Omtaler)
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 på 1 dag
(7 Omtaler)
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 Mer

$20 USD på 7 dager
(1 anmeldelse)
1.2