Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Comparing two Arrays and generating a new Array.?????????

$
0
0

Hi guys

can some one solve this problem. plz...

 

Say i have two arrays, one is String Array and other is selectedLayers array with same source names(a,b,c) selected in after effects.

Now i want to generate new Array using String in mySelectedComps[].source.name.

 

For example

 

var callName=["a","b"];

var mySelectedComps=app.project.activeItems.selectedLayers; //(eg.i have selected a,b,c comps in afx)

var newArray=[];


 

if(callName[]==mySelectedComps[].source.name){

newArray.push();

 

}

 

how to interate both arrays at same time or how to Compare an element in an Array1 with all elements in  Array2 until it returns true/false.and then go to next element in Array1. ??


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>