Find Jobs
Hire Freelancers

Tag-Based Message Formatting

€30-250 EUR

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

€30-250 EUR

Plata la predare
It is mandatory to have Node.js code. Consider a JSON object that contains the following structure and values: { "context": { "language": "FR", "channel": "WEB" }, "output": [ "ansCode": "BS_ANS_100", "otherdata": "othervalue" ], "user": { "name": "Bobby", "lastName": "Sponge", "age": "2", "balance": "$59.34" } } Consider an existing Database (MySQL) that contains the following table: TABLE Answer ( Answer_UID int PK Code string Language string Channel string Text string) That contains the following value as example: (100, “BS_ANS_100”, “EN”, “WEB”, “Hello dear <? [login to view URL] > <? [login to view URL] >, your balance is <? [login to view URL] >.”) We are looking for a Node.js function that: - Get the JSON object “[login to view URL]” value; - That fetch from the Database all records that match the value of the “[login to view URL]” for the given ‘[login to view URL]’ and ‘[login to view URL]’ defined in the JSON object. o If there are multiple records that are returned, a random record must be selected. o If there is no match in the DB because there is no DB entry for ‘Channel’, the record that match ‘Code’ and ‘Language’ must be returned. o If there is no match in the DB because there is no DB entry for ‘Language’, the record that match ‘Code’ and ‘Channel’ must be returned. o If there is no match in the DB because there is no DB entry for ‘Language’ and ‘Channel’, the record that match ‘Code’ must be returned. o If there is no match in the DB because there is no DB entry for ‘Code’, an error must be returned. - Extract the ‘Text’ string from the record of the DB - Calls an existing function to replace in ‘Text’ each tag (delimited by the ‘<?’ and the ‘>’) by their corresponding value in the JSON object. o The result of the above example will give: “Hello dear Bobby Sponge, your balance is $59.34.”. The tag “<? [login to view URL] >” has been replace by the JSON value of the key “[login to view URL]”. This replacement function exists and is currently working. o BUT on top of this, we are looking for Formatting capabilities. o If the Tag contains the word ‘Format’ then formatting must be applied. As example if Text = “Your balance is <? Format(‘# ##0.00 $’, [login to view URL]) >.” Then the function should return the string: “Your balance is 59.34 $.” o The formats for Currencies and Date must be supported, like “HH:mm:ss”, “DD/MM/YY” or “YYYY-MM-DD hh:mm:ss” etc. o We may think adding additional format in the future, but not many, therefore the formatting string ("HH:mm:ss" as example) must be flexible. Consider also that "Format" is our initial function that does formatting of text. We must be able to replace Format by some other capability. Here is an exemple: - Assume Text = “The weather for today is <? [login to view URL]('today', 'New York', 'temperature') >.” - The function should recognise that it is not Format but [login to view URL] and calla sub-function to get the weather for 'New York' for 'today' and 'temperature'. The number of parameter can depend. And the variable of the API must depend on the '[login to view URL]' value in the JSON object. - The result should be “The weather for today is 75F." We are looking for someone who can develop that Node.js function that takes as input parameter the JSON object and return a formatted string as described above. The function must perform the call into the DB and manage the errors as described above. Additionally the code must be flexible enough to manage different keywords like "[login to view URL]" and not just "Format".
ID-ul proiectului: 17450260

Despre proiect

10 propuneri
Proiect la distanță
Activ: 6 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
hi. i can do it. please send your code that does replacing values from json .
€100 EUR în 3 zile
5,0 (16 recenzii)
4,5
4,5
10 freelanceri plasează o ofertă medie de €171 EUR pentru proiect
Avatarul utilizatorului
Hello, I am expert working on Node.js, I always provide fastest results with quality. I have an experience of more than 10 years in web development and maintenance. I have in-depth knowledge of php, mysql, javascript , jquery, payment system integrations, API's, css, html, html5, wordpress. I will look forward to discuss with you. Thank you.
€194 EUR în 7 zile
4,6 (63 recenzii)
6,9
6,9
Avatarul utilizatorului
Dear Sir, Greeting from my side, Please accept my proposal for the job of Tag-Based Message Formatting I would like to apply for this project, and I will make it as per your requirement, as described in your Job details. Let me introduce our self, I and my teams are expert in Web design & development, iOS & Android apps as per requirement. If we talk about especially about web development & design we already create more than 2000+ website. Here list out development aspect which I can do/help you Professional Development • Web3 , NodeJS development • Web design & development • iOS and android apps development • UI &UX graphics & development • Complete e-commerce / business website development • Web applications using PHP, Laravel, CodeIgniter, MySQL & Wordpress, etc. • For business, ideas give a complete website-android-iOS solution When you would like to discuss our next steps. With warm regards & Thanks, Mxicoders
€250 EUR în 21 zile
4,9 (12 recenzii)
6,2
6,2
Avatarul utilizatorului
Hello! We are interesting your project very well and full time devlopers. We have great skill in Node.js and javascript. Our price and period is negotiable. Employee’s satisfy is my happiness ! Let's go ahead with me ! Our Skills: Responsive Website design PHP, CakePHP, Laravel, Codeigniter, Symphony, Wordpress HTML/CSS/JavaScript/jQuery/Bootstrap/AngularJS/Vuejs/SASS MySQL/MSSQL/PostgreSQL/SQLite/Oracle
€200 EUR în 31 zile
4,4 (71 recenzii)
6,2
6,2
Avatarul utilizatorului
Good day! Nice to meet you. Thank you for sharing this proposal. I am an expert just what you need for nodejs task with much years expirience. Want more real examples like sql or microservice? - just ask. Check my portfolio. I will be glad to work on your task with you. Best Regards.
€250 EUR în 5 zile
4,9 (12 recenzii)
5,3
5,3
Avatarul utilizatorului
Hi, I am a fullstack developer. I am strong on nodejs/expressjs/mogodb/MySQL. I read your requirements, i am clear what i should do. I can handle this project easily, I confident of completing this project on time. I have some questions: - As i understand, Format function must be defined on nodejs, because it is not existing as Replacement function, how about API function? is it existing or must be defined in nodejs? Let me handle this project! Please contact me for more detail! Thanks,
€60 EUR în 5 zile
0,0 (0 recenzii)
0,0
0,0
Avatarul utilizatorului
Hi, Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have got Rich experience in Joomla, Wordpress, Codeigniter, Cake PHP), .NET, Asp.NET, Vb.NET, HTML 5 etc.& mobile apps Also have very good knowledge of javascript, jQuery Json, API, Prototype Frameworks, and have developed various Parallax, Fluid responsive design. I am ready to discuss with you with best Regards
€155 EUR în 3 zile
0,0 (0 recenzii)
0,0
0,0

Despre client

Steagul FRANCE
France
0,0
0
Metoda de plată a fost confirmată
Membru din mai 30, 2018

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.