Looking for assistance here as I am fairly new to this. My goal is to transform the fullName
string returned from a webapp UI using Selenium WebDriverIO. Here's what I have:
const fullName = "Mr Jason Biggs";
The desired outcome should be structured like this:
title: 'Mr',
name: 'Jason',
surname: 'Biggs',
I attempted splitting the name, but unsure how to convert it into key-value pairs
const splitName = fullName.split(" ");
// Returns [ 'Mr', 'Jason', 'Biggs' ]