how to divide an array into 2 arrays?

I’m trying to turn this array into 2 different arrays. One array should be of names that contain the letter ‘o’ in them and the second array should be the rest of the names, that do not have ‘o’.

Given array:

var names = ['octavia', 'peter', 'olive', 'ava', 'aiden']; 

Desire result:

var nameO = ['octavia', 'olive'];
var nameNoO = ['peter', 'ava', 'aiden'];

This is the code I came up with. Got one of the results for names with ‘o’, but not without ‘o’.

var names = ['octavia', 'peter', 'olive', 'ava', 'aiden'];
var namesO = [];
var namesNoO = [];
for(let i in names){
  for(let j in names[i]){
    if(names[i][j] === 'o'){
      namesO.push(names[i]);
    } 
    if(names[i][j] !== 'o'){
    namesNoO.push(names[i])
    }
 }
}
console.log(namesO, namesNoO);