Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. var var ds_rateio = {};
  2. var teste = {};
  3. $('select[name="insTipoRateio[]"] option:selected').each(function() {
  4. if(typeof(ds_rateio[$(this).val()]) == 'undefined' || typeof(teste[$(this).attr("data-nf")]) == 'undefined'){
  5. ds_rateio[$(this).val()] = [];
  6. teste[$(this).attr("data-nf")] = [];
  7. }
  8. ds_rateio[$(this).val()].push($(this).attr("data-cnpj"));
  9. $.each(ds_rateio, function(key1, value) {
  10. value.push(teste);
  11. });
  12. });
  13. var ds_rateio = JSON.stringify(ds_rateio);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement