Want create new on condtion from old array

this offer array of offer_id

const pipe = [
    {
        $match: {
            is_active: true,
            status: 'active',
            entity_type: 'offer',
            entity_count: {
                $gt: 0
            }
        }
    },
    {
        $lookup: {
            from: 'offers',
            localField: 'offers',
            foreignField: '_id',
            as: 'offer'
        }
    },
    {
        $project: {
            offer: 1, name: 1,
            liveArray: { $cond: { if: { $eq: ['$offer.publish_status.value', '2'] }, then: '$offer._id', else: null } },
            notLiveArray: { $cond: { if: { $ne: ['$offer.publish_status.value', '2'] }, then: '$offer._id', else: null } }
        }
    }
];

We have no clue about what you want to do.

Sample source and result documents are needed with more details on the logic you want.