You can get the fields by using String#match with a regular expression (regex101). Then you can destructure (or manually assign), the 2nd, 3rd, and 4th parts of the string to the variables, and create an object:
const addressString = 'Calle del Padre Jesús Ordóñez, 18. 1, Madrid, España';
const [,addr, state, country] = addressString.match(/(.+),\s+([^,]+),\s+([^,]+)$/);
const address = {
address: addr,
state,
country
};
console.log(address);
solved Separate string