Go to the attribute edit page using magento 2 admin panel (Stores > Attributes > Product > Edit attribute)
Use console – ctrl + shift + J
Edit the js array mimim and then paste the following code in console.
$jq=new jQuery.noConflict(); var mimim=["Black","Blue","Blue Black"]; $jq.each(mimim,function(a,b){ $jq("#add_new_option_button").click(); $jq("#manage-options-panel tbody tr:last-child td:nth-child(3) input").val(b); });
Leave a Reply