Find Jobs
Hire Freelancers

2 small coding jobs with Node.js, Javascript, mongoose, mongoDB

$10-30 USD

Finalizat
Data postării: peste 3 ani în urmă

$10-30 USD

Plata la predare
See description below or easier to read in attached file. The following assignment is small and just looks huge. The following description is just very detailed to make sure that no misunderstandings arise. I'm using node.js with express, mongoose and mongodb and have some user documents in my mongodb user collection. The documents do also have nested values and arrays. Please see one representative and simplified example for one user document in mongoDB user collection: user = [ { _id: ObjectId("xyz2"), property: Array 0: "A" 1: "B" 2: "C" 3: "S" 4: "N" userId: "userId1", contactDetails: Object companyName: Array 0: Object date:2020-08-23T11:52:48.535+00:00 _id: ObjectId("xyz") name:"companyA" 1: Object date:2020-08-24T11:52:48.535+00:00 _id: ObjectId("xyz") name:"companyB" firstName: Array 0: Object date:2020-08-23T11:52:48.535+00:00 _id: ObjectId("xyz") name:"firstName0" 1: Object date:2020-08-24T11:52:48.535+00:00 _id: ObjectId("xyz") name:"firstName1" 2: Object date:2020-08-24T11:52:48.535+00:00 _id: ObjectId("xyz") name:"firstName2" 3: Object date:2020-08-24T11:52:48.535+00:00 _id: ObjectId("xyz") name:"firstName3" secondName: Array 0: Object date:2020-08-23T11:52:48.535+00:00 _id: ObjectId("xyz") name:"secondName0" 1: Object date:2020-08-24T11:52:48.535+00:00 _id: ObjectId("xyz") name:"secondName1" 2: Object date:2020-08-24T11:52:48.535+00:00 _id: ObjectId("xyz") name:"secondName2" }] The lengths of the arrays secondName and firstName is unknown. Can be 0, 1, can be 3, can be 67, ... Assignment number 1: Code an efficient solution to check if document with ObjectId xyz2 has at least one Object in secondName AND (&&) firstName. The result shall be boolean true or false. I like to check if user provided first name and second name after resgistration. If both are not provided, means not minimum one object in each, boolean shall be fullName = false. For the above example above it should be fullName = true. Assignment number 2: This assignement must consist of two steps. Not one (function). 1th Step) Now, I like to find all users/documents in user collection by property "N". So maybe something like this: const allUserN = await [login to view URL]({ property: { $in: ["N"] } }) ... But I don't like to list the entire content of each found document. Only the following: - userId - latest name in secondName array (Example above secondName2) - latest name in firstName array (Example above firstName3) So only list an array called "allUserN" with all N documents with only the three key value pairs above. 2th Step) Then, in a second step (not everything in one function), manipulate and restructure the array from 1th step so that I can use it for React Select ([login to view URL]) This means: Rename / create new keys by using firstName secondName for label and userId for value. Result (for example four found documents): const allUserN2 = [ { value: "xyz2", label: "firstName3 secondName2" }, { value: "...", label: "..." }, { value: "...", label: "..." }, { value: "...", label: "..." }, ]; In the end two steps/solutions/functions/actions/whatever are needed. After providing your solution I will try it and if it works I release the payment. If not working, I can ask you. In worst case, we can use anydesk. In case of questions, you can ask me and I you. NO Scammers and NO bargaining and No Asking for tip after contract approval! Only efficient JS solution with smalest possible performance need. No JQuery. No further packages. Only JS.
ID-ul proiectului: 27079744

Despre proiect

6 propuneri
Proiect la distanță
Activ: 4 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte
Acordat utilizatorului:
Avatarul utilizatorului
This looks doable within one hour, assignment 1 seems easy, I will do it within 30 mins, lets chat now
$30 USD în 1 zi
5,0 (49 recenzii)
5,4
5,4
6 freelanceri plasează o ofertă medie de $37 USD pentru proiect
Avatarul utilizatorului
Hi there, Let's have quick talk to get more details from you, & make it exactly like you want 100% -- expert MongoDB/Express/JS/ of course, will using JS only..
$70 USD în 1 zi
5,0 (34 recenzii)
7,2
7,2
Avatarul utilizatorului
I can do it .
$20 USD în 7 zile
5,0 (7 recenzii)
2,6
2,6
Avatarul utilizatorului
I love to do online work which is my dream and I will makes you will be happy regarding my performance
$20 USD în 7 zile
0,0 (0 recenzii)
0,0
0,0
Avatarul utilizatorului
I've been optimizing Mongo queries for years, this seems like a fun project. I do comment my complex queries so you'll have a reference to do this in the future. Und Ich kann ein bisschen Deutsch sprechen - wenn das wichtig ist. :)
$30 USD în 1 zi
0,0 (0 recenzii)
0,0
0,0

Despre client

Steagul GERMANY
Berlin, Germany
4,9
33
Metoda de plată a fost confirmată
Membru din ian. 18, 2017

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.