I need to map through an array so i can get all the notes pushed in an array params.createdNotes can i map inside the variable sortNotes so i can have a url like below :
/api/35678&page=1¬es[]=2¬es[]=4¬es[]=5
params.createdNotes = [2, 4, 5]
instance.fetchNotes = (params) => {
let sortNotes = (params.createdNotes.length === 0) ? '' : '¬es[]='+params.createdNotes;
return instance.get(
'/api/'+params.section+'&page='+params.currentPage+sortNotes
)
}