Create an Array of Objects for Patch Notes in React
You got the first step right by removing every white space and line breaks from your string. Next you will have to remove the first occurence of ### by splitting your string and then slicing out the first element.

When done, you will have to map the result of your split. Map will create a new array the exact same size of your input and apply the same function on every attribute of it.

You will then have to split each update by the *. When done, you can get the first value of your array with shift. This function will give out the first element of your array and delete it from the array, only leaving the notes that are going to be put in the notes variable :



const data = '### 0.1.2\n* Patch notes now implemented when the modal starts.\n* Added top lists for organizations\n### 0.0.1\n* Patch Notes Added\n* Modal to include Patch Notes'

const updates = data.replace(/(\r\n|\n|\r)/g, '').split('### ').slice(1).map(update =&gt; {
 updateData = update.split('* ')
 return {
  version: updateData.shift(),
  notes: updateData
 }
})

console.log(updates)




You can then put this function in the .then of your axios call