Find Jobs
Hire Freelancers

[Python] I need someone to help count items from response [json]

$10-30 AUD

I përfunduar
Postuar over 5 years ago

$10-30 AUD

Paguhet në dorëzim
Here's what I need help with: - I have a program, that looks inside of a response, if it finds an ID matching my list, it will print and save the name I have given the ID. It works well actually, where I need help with is if an ID is found twice, it will only print/save it once, when I'd like it saved twice. Ideally I'd like it to save it in the following format: Id1 x1 <found1 Id2 x1 <found1 Id 3 x2,3,4,5 ect <found2,3,4,5, ect Code being used: IDs = {'NameHere':'IdHere', 'NameHere':'IdHere', 'NameHere':'IdHere',} M = [k for (k, c) in sorted([login to view URL]()) if c in [login to view URL]] print M ^Printing that when used with my requests, will only print items from my list if any are found, I'd like a way implemented to add quantities, saving them with x1, x2, x3 ect. Ideal output: Bobx1 Gregx3 Billyx2 Script to test with: realresponse = { "cards": [{ "id": 1, "card_id": 2, "exp": 0, "skill_lv": 1, "released_rate": 0.0, "awakenings": [], "unlocked_square_statuses": [], "created_at": 1546646705, "potential_parameters": [] }] } IDs = {'Bob': '123', 'Billy': '456', 'Greg': '789'} sample = {'123', '789', '123'} M = [k for (k, c) in sorted([login to view URL]()) if c in sample] print M realresponse is not used, its there to show what a real response I get looks like. I can provide clearer information privately.
ID e Projektit: 18466507

Rreth projektit

3 propozime
Projekt në distancë
Aktive 5 yrs ago

Po kërkoni të fitoni para?

Përfitimet e ofertës për Freelancer

Vendosni buxhetin dhe afatin tuaj
Paguhuni për punën tuaj
Përshkruani propozimin tuaj
Është falas të regjistrohesh dhe të bësh oferta për punë
I dhënë për:
Avatari i Përdoruesit
Worked with python last 5 years, familiar with API responses and handling - last 3 projects required it
$25 AUD në 1 ditë
5,0 (1 review)
3,8
3,8
3 freelancers are bidding on average $20 AUD for this job
Avatari i Përdoruesit
i am gopinath i have 3+ year experience in software development unity3d,android,ios...............................................................................................
$15 AUD në 1 ditë
0,0 (0 përshtypje)
0,0
0,0
Avatari i Përdoruesit
Hello, I've read your offer and it seems like a simple task, so it can be done briefly. I have around 3 years of python experience. I have integrated APIs using json format many times, so what you're asking for is not a problem. If I understand correctly, multiple instances of the same ID are only being counted as one, right?
$20 AUD në 1 ditë
0,0 (0 përshtypje)
0,0
0,0

Rreth klientit

Flamuri i AUSTRALIA
canberra, Australia
5,0
2
Anëtar që nga jan 3, 2019

Verifikimi i klientit

Faleminderit! Ne ju kemi dërguar me email një lidhje për të kërkuar kredinë tuaj falas.
Ndodhi një gabim gjatë dërgimit të email-it tuaj. Ju lutemi provoni përsëri.
Përdorues të regjistruar Punë të postuara
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Po ngarkohet shikimi paraprak
Leja u dha për Geolocation.
Seanca e hyrjes ka skaduar dhe ke dalë. Hyr sërish.