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'}
Apex Code Editor

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 account

How 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

Note

You can test your code by connecting to Salesforce, but to save your progress and earn points, you'll need to create an account. Your solutions and achievements will be tracked automatically once you're logged in.