# Filter an array? not sure what it is called :)

**URL:** <https://forum.kirupa.com/t/filter-an-array-not-sure-what-it-is-called/277035>\
**Category:** Uncategorized\
**Created:** [December 6, 2008, 3:10pm UTC](https://forum.kirupa.com/t/filter-an-array-not-sure-what-it-is-called/277035 "2008-12-06T15:10:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designhustler](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@designhustler](https://forum.kirupa.com/u/designhustler)\
**Post date:** [December 6, 2008, 3:10pm UTC](https://forum.kirupa.com/t/filter-an-array-not-sure-what-it-is-called/277035/1 "2008-12-06T15:10:46Z")

</div>

I have an array that looks like this:  
100\_0061.JPG,100\_0064.JPG,100\_0068.JPG,100\_0069.JP G,test.swf,test.fla, test.psd

and the code that is building it:  
//jpgs to load  
basePath = mdm.Application.path + “presFiles/”  
var myFiles:Array = mdm.FileSystem.getFileList(basePath, “_._”);  
numberOfFiles = myFiles.length

How can I remove fla and psd files and update the length of the array. Or, how can I filter the array to only show swf and jpg files?
