For below function 'JSON OBJECT!' prints after 'JSON to CSV!' and the second print statement does not contain the json data. Please help.
    function _inputs() {
    let responseData:any = [];
    const csvFilePath='Data/output.csv'
    const csv=require('csvtojson')
    csv()
        .fromFile(csvFilePath)
        .then((jsonObj)=>{
            responseData.push(jsonObj);
            console.log('JSON OBJECT!' + JSON.stringify(responseData));
            responseData;
        });
    console.log('JSON to CSV! ' + responseData);
    return responseData;
};
 
    