This question runs in a pre-configured Salesforce environment - no personal connection required.
Fetch posts from https://dummyjson.com/posts and users from https://dummyjson.com/users. Return a Map<String, String> where the key is the post title and the value is the user full name (firstName + lastName with a space between them).
Each post has a userId field that corresponds to the id field in the users data. Use this to correlate posts with their authors.
Examples:
API calls made to both endpoints:
- GET https://dummyjson.com/posts (returns posts with userId references)
- GET https://dummyjson.com/users (returns users with id and name fields)
Expected correlation logic:
- Post with userId=1 matches User with id=1
- Post title becomes map key, User firstName + ' ' + lastName becomes value
Sample output:
{'His mother had always taught him': 'Emily Johnson', 'He was an expert but not in a discipline': 'Michael Williams'}
Welcome to Lightning Challenge!
Create an Account
Sign up to track your progress, earn points, and compete with others. Your solutions will be saved automatically.
Create accountHow It Works
- • Write your solution in the code editor
- • Connect your Salesforce org to test
- • Submit to check if your solution passes
- • Use hints if you get stuck
Contest Alert
Contest runs May 1 - 31. Complete challenges to climb the leaderboard!
Only the 31 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.